mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 14:22:33 +01:00
chore: 🔧 remove cors
This commit is contained in:
parent
cc651351cc
commit
bd91df5f00
3 changed files with 1 additions and 13 deletions
|
@ -55,7 +55,6 @@
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"lodash.groupby": "^4.6.0",
|
"lodash.groupby": "^4.6.0",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"micro-cors": "^0.1.1",
|
|
||||||
"next": "^9.4.1",
|
"next": "^9.4.1",
|
||||||
"next-with-apollo": "^5.0.1",
|
"next-with-apollo": "^5.0.1",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { ApolloServer } from 'apollo-server-micro';
|
||||||
import { thunderHubSchema } from 'api/schemas';
|
import { thunderHubSchema } from 'api/schemas';
|
||||||
import { getIp } from 'api/helpers/helpers';
|
import { getIp } from 'api/helpers/helpers';
|
||||||
import getConfig from 'next/config';
|
import getConfig from 'next/config';
|
||||||
import Cors from 'micro-cors';
|
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
import { logger } from 'api/helpers/logger';
|
import { logger } from 'api/helpers/logger';
|
||||||
import {
|
import {
|
||||||
|
@ -37,11 +36,6 @@ const accountConfig = getAccounts(accountConfigPath);
|
||||||
|
|
||||||
readCookie(cookiePath);
|
readCookie(cookiePath);
|
||||||
|
|
||||||
const cors = Cors({
|
|
||||||
origin: true,
|
|
||||||
allowCredentials: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
const apolloServer = new ApolloServer({
|
const apolloServer = new ApolloServer({
|
||||||
schema: thunderHubSchema,
|
schema: thunderHubSchema,
|
||||||
context: async ({ req }) => {
|
context: async ({ req }) => {
|
||||||
|
@ -100,4 +94,4 @@ export const config = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default cors(handler);
|
export default handler;
|
||||||
|
|
|
@ -11508,11 +11508,6 @@ methods@~1.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||||
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
|
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:
|
micro@^9.3.2:
|
||||||
version "9.3.4"
|
version "9.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/micro/-/micro-9.3.4.tgz#745a494e53c8916f64fb6a729f8cbf2a506b35ad"
|
resolved "https://registry.yarnpkg.com/micro/-/micro-9.3.4.tgz#745a494e53c8916f64fb6a729f8cbf2a506b35ad"
|
||||||
|
|
Loading…
Add table
Reference in a new issue