Skip to content

Commit

Permalink
fix: configure express to know about Cloud Run's proxy (#3586)
Browse files Browse the repository at this point in the history
* fix: configure express to know about Cloud Run's proxy

* fix: lint

---------

Co-authored-by: Patti Shin <[email protected]>
  • Loading branch information
glasnt and pattishin authored Dec 13, 2023
1 parent dfb4fa9 commit c89fde7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions run/filesystem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const limit = rateLimit({
app.use(limit);
app.use(mntDir, express.static(mntDir));

// configure express to know about Cloud Run's proxy
app.set('trust proxy', 1);

app.listen(port, () => {
console.log(`Listening on port ${port}`);
});
Expand Down

0 comments on commit c89fde7

Please sign in to comment.