Skip to content

Commit f4317a1

Browse files
committed
fix: downgrade express
1 parent de26bd1 commit f4317a1

File tree

3 files changed

+152
-473
lines changed

3 files changed

+152
-473
lines changed

index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ const fs = require('fs');
99
const _ = require('lodash');
1010
const { expressCspHeader, INLINE, NONE, SELF } = require('express-csp-header');
1111

12-
13-
const prerender = require('prerender-node');
14-
1512
//TODO: list whitelisted urls to github with description
1613
const cspConfig = config.csp;
1714
const cspOptions = _.cloneDeep(cspConfig);
@@ -42,9 +39,6 @@ if (cspConfig) {
4239
app.use(expressCspHeader(cspOptions));
4340
}
4441

45-
46-
app.use(prerender.set('prerenderToken', 'CrrAflHAEiF44KMFkrs7'));
47-
4842
app.use(express.static(__dirname + '/dist/citizenos-fe/browser'));
4943

5044
const browserDetect = (req, res, next) => {
@@ -76,7 +70,7 @@ const browserDetect = (req, res, next) => {
7670
}
7771

7872
app.use(browserDetect);
79-
app.get('/*', browserDetect, function (req, res) {
73+
app.get('*', browserDetect, function (req, res) {
8074
res.sendFile(__dirname + '/dist/citizenos-fe/browser/index.html');
8175
res.set('Permissions-Policy', 'interest-cohort=()'); // Opt-out of Google FLoC
8276
});
@@ -92,7 +86,6 @@ http.createServer(app).listen(portHttp, host, function (err, res) {
9286
console.log('HTTP server listening on port ' + portHttp);
9387
});
9488

95-
9689
if (app.get('env') === 'development') {
9790
const portHttps = process.env.PORT_SSL || 3001;
9891
const options = {

0 commit comments

Comments
 (0)