Skip to content

Commit

Permalink
Fix CORS for infoscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
aksun1 committed Oct 26, 2024
1 parent 7f80048 commit 22f91b9
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
54 changes: 54 additions & 0 deletions app/backend/package-lock.json

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

2 changes: 2 additions & 0 deletions app/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@types/passport-oauth2": "^1.4.15",
"@types/request": "^2.48.12",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-session": "^1.17.3",
Expand All @@ -28,6 +29,7 @@
"ws": "^8.12.1"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.17",
"@types/node": "^18.14.0",
"@types/ws": "^8.5.4",
Expand Down
2 changes: 2 additions & 0 deletions app/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import express = require("express");
import cors = require("cors");
import { Express, Request, Response } from "express";
import http = require("http");
import WebSocket = require("ws");
Expand All @@ -25,6 +26,7 @@ import {
// Setup express app and middlewares
const app: Express = express();
app.use(express.json());
app.use(cors());

app.use(cookieParser());
const sessionParser = session({
Expand Down

0 comments on commit 22f91b9

Please sign in to comment.