chore: 🔧 remove cors

This commit is contained in:
AP 2020-05-21 10:25:56 +02:00
parent cc651351cc
commit bd91df5f00
3 changed files with 1 additions and 13 deletions

View file

@ -55,7 +55,6 @@
"lodash.debounce": "^4.0.8",
"lodash.groupby": "^4.6.0",
"lodash.merge": "^4.6.2",
"micro-cors": "^0.1.1",
"next": "^9.4.1",
"next-with-apollo": "^5.0.1",
"numeral": "^2.0.6",

View file

@ -3,7 +3,6 @@ import { ApolloServer } from 'apollo-server-micro';
import { thunderHubSchema } from 'api/schemas';
import { getIp } from 'api/helpers/helpers';
import getConfig from 'next/config';
import Cors from 'micro-cors';
import jwt from 'jsonwebtoken';
import { logger } from 'api/helpers/logger';
import {
@ -37,11 +36,6 @@ const accountConfig = getAccounts(accountConfigPath);
readCookie(cookiePath);
const cors = Cors({
origin: true,
allowCredentials: true,
});
const apolloServer = new ApolloServer({
schema: thunderHubSchema,
context: async ({ req }) => {
@ -100,4 +94,4 @@ export const config = {
},
};
export default cors(handler);
export default handler;

View file

@ -11508,11 +11508,6 @@ methods@~1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
micro-cors@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/micro-cors/-/micro-cors-0.1.1.tgz#af7a480182c114ffd1ada84ad9dffc52bb4f4054"
integrity sha512-6WqIahA5sbQR1Gjexp1VuWGFDKbZZleJb/gy1khNGk18a6iN1FdTcr3Q8twaxkV5H94RjxIBjirYbWCehpMBFw==
micro@^9.3.2:
version "9.3.4"
resolved "https://registry.yarnpkg.com/micro/-/micro-9.3.4.tgz#745a494e53c8916f64fb6a729f8cbf2a506b35ad"