Skip to content

Commit

Permalink
handle missing 'fly-client-ip' (#7814)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s authored Apr 5, 2022
1 parent 4382706 commit 8821ff8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ class Server {
// On Fly we can use the Fly-Client-IP header
// https://fly.io/docs/reference/runtime-environment/#request-headers
req.ip = req.headers['fly-client-ip']
? req.headers['fly-client-ip']
: req.socket.remoteAddress
} else {
req.ip = req.socket.remoteAddress
}
Expand Down

0 comments on commit 8821ff8

Please sign in to comment.