|
@ -42,6 +42,12 @@ app.use(cookieParser());
|
|
app.use(express.static(path.join(__dirname, 'public')));
|
|
app.use(express.static(path.join(__dirname, 'public')));
|
|
app.use(methodOverride(null, {methods: ['GET', 'POST', 'PUT', 'DELETE']}));
|
|
app.use(methodOverride(null, {methods: ['GET', 'POST', 'PUT', 'DELETE']}));
|
|
|
|
|
|
|
|
//禁止options请求
|
|
|
|
app.options('*', (req, res) => {
|
|
|
|
res.status(406)
|
|
|
|
.send({message: "禁止options"});
|
|
|
|
});
|
|
|
|
|
|
// web pages and endpoint
|
|
// web pages and endpoint
|
|
UrlInitializer.initWebPages(app);
|
|
UrlInitializer.initWebPages(app);
|
|
UrlInitializer.initRestApi(app);
|
|
UrlInitializer.initRestApi(app);
|