Update index.js

This commit is contained in:
Mr Swift
2024-02-04 11:25:45 +03:30
parent 73e785d764
commit 425a52c242
+12
View File
@@ -25,6 +25,18 @@ function init() {
app.use(express.urlencoded({ extended: true }))
app.use(fileUpload())
console.log('🟢 ~ Node Server is running ')
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, siteuser');
res.setHeader('Author', "Mr Swift")
res.setHeader(
"Strict-Transport-Security",
"max-age=31536000; includeSubDomains; preload"
);
next();
});
// load plugins
// getVerityToken()