Skip to content

Commit

Permalink
Add CORS headers for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteHoodHacker authored Jun 17, 2024
1 parent d2ed0eb commit fe9eb38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from 'path'
import fastify from 'fastify'
import fastifyStatic from 'fastify-static'
import helmet from 'fastify-helmet'
import cors from 'fastify-cors'
import hyperid from 'hyperid'
import config from './config/server'
import { serveIndex, getRealIp } from './util'
Expand Down Expand Up @@ -49,6 +50,10 @@ app.register(helmet, {
}
})

app.register(cors, {
origin: ["https://2024.uiuc.tf", "https://uiuctf-2024-rctf-frontend.pages.dev"]

Check failure on line 54 in server/app.js

View workflow job for this annotation

GitHub Actions / lint (12)

Strings must use singlequote

Check failure on line 54 in server/app.js

View workflow job for this annotation

GitHub Actions / lint (12)

Strings must use singlequote
})

uploadProviderInit(app)

app.register(api, {
Expand Down

0 comments on commit fe9eb38

Please sign in to comment.