Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis authored Jan 30, 2019
1 parent 8e23c0b commit 85ab513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ and sets a header in the outbound requests:
```golang
addHeader := gateway.RequestMiddleware(func(r *http.Request) error {
// i know i know ... context.Value is the worst. Feel free to put your favorite workaround here
r.Header.Set("X-Forwarded-For", r.Context().Value("source-ip").(string)
r.Header.Set("X-Forwarded-For", r.Context().Value("source-ip").(string))

// no errors
return nil
Expand Down

0 comments on commit 85ab513

Please sign in to comment.