Use CORS in front of static server
This commit is contained in:
parent
42abd00e2f
commit
d560b6281f
|
@ -27,6 +27,7 @@ app.disable('x-powered-by');
|
||||||
app.enable('trust proxy');
|
app.enable('trust proxy');
|
||||||
|
|
||||||
app.use(logger);
|
app.use(logger);
|
||||||
|
app.use(cors);
|
||||||
app.use(staticFiles);
|
app.use(staticFiles);
|
||||||
|
|
||||||
// Special startup request from App Engine
|
// Special startup request from App Engine
|
||||||
|
@ -38,7 +39,6 @@ app.get('/_ah/start', (req, res) => {
|
||||||
app.get('/', serveMainPage);
|
app.get('/', serveMainPage);
|
||||||
|
|
||||||
app.use(redirectLegacyURLs);
|
app.use(redirectLegacyURLs);
|
||||||
app.use(cors);
|
|
||||||
|
|
||||||
app.use(
|
app.use(
|
||||||
'/api',
|
'/api',
|
||||||
|
|
Loading…
Reference in New Issue