mirror of
https://github.com/wassname/talk.git
synced 2026-08-20 12:50:41 +08:00
[next] Added trust proxy configuration (#2471)
* feat: added trust proxy configuration * chore: version bump
This commit is contained in:
committed by
Kim Gardner
parent
abb793b16a
commit
e76fddd13c
@@ -104,9 +104,12 @@ export const listenAndServe = (
|
||||
function configureApplication(options: AppOptions) {
|
||||
const { parent } = options;
|
||||
|
||||
// Trust the first proxy in front of us, this will enable us to trust the fact
|
||||
// that SSL was terminated correctly.
|
||||
parent.set("trust proxy", 1);
|
||||
// Trust the proxy in front of us, this will enable us to trust the fact that
|
||||
// SSL was terminated correctly.
|
||||
const trust = options.config.get("trust_proxy");
|
||||
if (trust) {
|
||||
parent.set("trust proxy", trust);
|
||||
}
|
||||
|
||||
// Setup the view config.
|
||||
setupViews(options);
|
||||
|
||||
Reference in New Issue
Block a user