Skip to content

Commit c89fde7

Browse files
glasntpattishin
andauthored
fix: configure express to know about Cloud Run's proxy (#3586)
* fix: configure express to know about Cloud Run's proxy * fix: lint --------- Co-authored-by: Patti Shin <[email protected]>
1 parent dfb4fa9 commit c89fde7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

run/filesystem/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const limit = rateLimit({
3737
app.use(limit);
3838
app.use(mntDir, express.static(mntDir));
3939

40+
// configure express to know about Cloud Run's proxy
41+
app.set('trust proxy', 1);
42+
4043
app.listen(port, () => {
4144
console.log(`Listening on port ${port}`);
4245
});

0 commit comments

Comments
 (0)