Skip to content

Commit

Permalink
Revert "[#0] Allow CORS from the known FE client"
Browse files Browse the repository at this point in the history
This reverts commit 41bb452.
  • Loading branch information
3jins authored Feb 16, 2021
1 parent 960fe1d commit 2211fe5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions backend/config/local.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
server:
port: 5913

client:
url: http://localhost
port: 8080

db:
url: localhost
port: 27017
Expand Down
4 changes: 0 additions & 4 deletions backend/config/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
server:
port: 443

client:
url: TBD
port: TBD

db:
url: TBD
port: 27017
Expand Down
8 changes: 0 additions & 8 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@koa/cors": "^3.1.0",
"@koa/router": "^9.4.0",
"@types/pino": "^6.3.4",
"axios": "^0.19.2",
Expand Down
3 changes: 0 additions & 3 deletions backend/src/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'reflect-metadata';
import Koa from 'koa';
import Router from '@koa/router';
import cors from '@koa/cors';
import config from 'config';
import { Connection } from 'mongoose';
import { Server } from 'http';
Expand Down Expand Up @@ -30,10 +29,8 @@ const makeRouter = (apiRouterList: Router[]): Router => {
};

const makeApp = (router: Router): Koa => {
const { url: clientUrl, port: clientPort } = config.get('client');
const app = new Koa();
app
.use(cors({ origin: `${clientUrl}:${clientPort}` }))
.use(async (ctx, next) => {
const { ip } = ctx.request;
const rt = ctx.response.get('X-Response-Time');
Expand Down

0 comments on commit 2211fe5

Please sign in to comment.