Skip to content

Commit 783599b

Browse files
noam-honigndom91
authored andcommitted
fix(express): use app.set for "trust proxy" (#10503)
Co-authored-by: Nico Domino <[email protected]>
1 parent c796fb4 commit 783599b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/frameworks-express/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
* const app = express()
2323
*
2424
* // If app is served through a proxy, trust the proxy to allow HTTPS protocol to be detected
25-
* app.use('trust proxy')
25+
* // https://expressjs.com/en/guide/behind-proxies.html
26+
* app.set('trust proxy', true)
2627
* app.use("/auth/*", ExpressAuth({ providers: [ GitHub ] }))
2728
* ```
2829
*

0 commit comments

Comments
 (0)