Skip to content

Commit 5761277

Browse files
CORS support
1 parent 6d7495b commit 5761277

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

generateLaunch.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ const s3 = new S3Client({ region: S3_REGION });
2424
const express = require("express");
2525
const axios = require("axios");
2626
const { exec } = require("child_process");
27+
const cors = require("cors");
2728
const fs = require("fs");
2829
const path = require("path");
2930

3031
// Initialize Express app
3132
const app = express();
3233
const port = process.env.PORT || 3000;
3334

35+
// Enable CORS for all routes
36+
app.use(cors());
37+
3438
// Middleware to parse JSON bodies
3539
app.use(express.json());
3640

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"dependencies": {
2525
"@aws-sdk/client-s3": "^3.775.0",
2626
"axios": "^1.8.4",
27+
"cors": "^2.8.5",
2728
"crypto": "^1.0.1",
2829
"express": "^4.21.2",
2930
"query-string": "^7.0.1"

0 commit comments

Comments
 (0)