Commit 833f83a8 authored by Thibaut Broggi's avatar Thibaut Broggi

Use "trust proxy" in express

parent 9a129ce5
......@@ -9,6 +9,7 @@ const app = express();
const config = require('./config.json');
const i18n = require('./i18n.js');
app.set('trust proxy', true);
app.set('x-powered-by', false);
app.set('view engine', 'pug');
app.use(express.static('./static'));
......@@ -99,7 +100,7 @@ function tweetMessage(req) {
+ encodeURIComponent('La Quadrature du Net ! #LQDoN ')
+ encodeURIComponent(req.protocol + "://" + req.headers.host)
+ ' '
+ encodeURIComponent(buildUrl(req)) ;
+ encodeURIComponent(buildUrl(req));
}
app.get('/generate.png', function (req, res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment