Skip to content

Commit

Permalink
Add cors (#149)
Browse files Browse the repository at this point in the history
* Added cors package to webserver

* Typo fixed
  • Loading branch information
GrzegorzDrozda authored Mar 29, 2023
1 parent 6d13f55 commit 72a09c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions webserver/server/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import SwaggerSingleton from './models/SwaggerSingleton';
import { ValidateError } from 'tsoa';
import { StatusCodes } from 'http-status-codes';
import { Errors, genErrorMessage } from '../../shared/errors';
import cors from 'cors';

export const app = express();

app.use(cors());

app.use(
bodyParser.urlencoded({
extended: true,
Expand Down
4 changes: 3 additions & 1 deletion webserver/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
"pg-tx": "^1.0.1",
"swagger-ui-express": "4.5.0",
"tsd": "0.24.1",
"tsoa": "4.1.2"
"tsoa": "4.1.2",
"cors": "2.8.5"
},
"devDependencies": {
"@types/body-parser": "1.19.2",
"@types/cors": "2.8.13",
"@types/eslint": "8.4.6",
"@types/eslint-plugin-prettier": "3.1.0",
"@types/express": "4.17.14",
Expand Down

0 comments on commit 72a09c2

Please sign in to comment.