Skip to content

Commit 175d2a4

Browse files
fix: cors backend
1 parent bf4f66b commit 175d2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

calc-backend/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const PORT = process.env.PORT || 3000;
1010
const app = express();
1111

1212
app.use(cors({
13-
origin: "http://localhost:5173",
13+
origin: process.env.FRONTEND_URL || "http://localhost:5173",
1414
methods: ["GET", "POST", "PUT", "DELETE"],
1515
allowedHeaders: ["Content-Type", "Authorization"],
1616
credentials: true,

0 commit comments

Comments
 (0)