251004 frontend backend
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import fs from "node:fs";
|
||||
import express from "express";
|
||||
import cors from "cors";
|
||||
import cookieParser from "cookie-parser"; // added
|
||||
|
||||
import sql from "./db/index.js";
|
||||
import healthRouter from "./routes/health.js";
|
||||
@@ -75,6 +76,10 @@ app.use(
|
||||
exposedHeaders: ["Content-Disposition", "Content-Length"],
|
||||
})
|
||||
);
|
||||
|
||||
// parse cookies สำหรับ access_token / refresh_token
|
||||
app.use(cookieParser()); // added
|
||||
|
||||
app.options(
|
||||
"*",
|
||||
cors({
|
||||
|
||||
Reference in New Issue
Block a user