Skip to content

Commit

Permalink
api: Update CORS settings
Browse files Browse the repository at this point in the history
  • Loading branch information
c032 committed Jul 28, 2024
1 parent 50e9bf7 commit 013016f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
postgresql:
condition: "service_healthy"
environment:
- "CORS_ORIGIN=https://ffxiv.c032.dev"
- "POSTGRESQL_CONNECTION_STRING_FILE=/usr/local/etc/ffxiv-world-status-api/postgresql_connection_string_development"
- "PORT=8000"
links:
Expand Down
3 changes: 1 addition & 2 deletions api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);

const corsOptions = {
// TODO: Get from config.
origin: "https://c032.dev",
origin: process.env.CORS_ORIGIN,
};
app.enableCors(corsOptions);

Expand Down

0 comments on commit 013016f

Please sign in to comment.