forked from UKSOURCE/cms.hailearning.edu.vn
feat: Implement core admin panel functionalities including appointment, contact, and pricing management with associated models, controllers, views, and routes.
This commit is contained in:
15
server.js
15
server.js
@@ -42,6 +42,21 @@ app.use(
|
||||
},
|
||||
express.static(path.join(__dirname, "assets")),
|
||||
);
|
||||
app.use(
|
||||
"/uploads",
|
||||
(req, res, next) => {
|
||||
// Cho phép mọi domain truy cập tài nguyên tĩnh
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Methods", "GET");
|
||||
next();
|
||||
},
|
||||
express.static(path.join(__dirname, "public", "uploads")),
|
||||
);
|
||||
|
||||
// Serve other public files
|
||||
app.use(
|
||||
express.static(path.join(__dirname, "public")),
|
||||
);
|
||||
|
||||
// Session configuration
|
||||
app.use(
|
||||
|
||||
Reference in New Issue
Block a user