Skip to content

Commit

Permalink
it's fastly-client-ip not Fastly-Client-IP (github#25623)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored Feb 24, 2022
1 parent 1b22582 commit 17b4432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const asyncMiddleware = (fn) => (req, res, next) => {
}

// The IP address that Fastly regards as the true client making the request w/ fallback to req.ip
morgan.token('client-ip', (req) => req.headers['Fastly-Client-IP'] || req.ip)
morgan.token('client-ip', (req) => req.headers['fastly-client-ip'] || req.ip)
const productionLogFormat = `:client-ip - ":method :url" :status - :response-time ms`

export default function (app) {
Expand Down

0 comments on commit 17b4432

Please sign in to comment.