diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-29 10:58:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-29 11:03:30 +0200 |
commit | 490b595a01c5824ff63ffb87f0efdfca95f4bf3b (patch) | |
tree | 3ad716fbb97a8b4ee946ad907202b82934a33d7c /server.ts | |
parent | 23f4c3d412974fa5fda52589d1192e098e260f1a (diff) | |
download | PeerTube-490b595a01c5824ff63ffb87f0efdfca95f4bf3b.tar.gz PeerTube-490b595a01c5824ff63ffb87f0efdfca95f4bf3b.tar.zst PeerTube-490b595a01c5824ff63ffb87f0efdfca95f4bf3b.zip |
Prevent brute force login attack
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -48,6 +48,9 @@ if (errorMessage !== null) { | |||
48 | throw new Error(errorMessage) | 48 | throw new Error(errorMessage) |
49 | } | 49 | } |
50 | 50 | ||
51 | // Trust our proxy (IP forwarding...) | ||
52 | app.set('trust proxy', CONFIG.TRUST_PROXY) | ||
53 | |||
51 | // ----------- Database ----------- | 54 | // ----------- Database ----------- |
52 | 55 | ||
53 | // Initialize database and models | 56 | // Initialize database and models |
@@ -81,6 +84,7 @@ if (isTestInstance()) { | |||
81 | ) { | 84 | ) { |
82 | return (cors({ | 85 | return (cors({ |
83 | origin: 'http://localhost:3000', | 86 | origin: 'http://localhost:3000', |
87 | exposedHeaders: 'Retry-After', | ||
84 | credentials: true | 88 | credentials: true |
85 | }))(req, res, next) | 89 | }))(req, res, next) |
86 | } | 90 | } |