Skip to content

Commit

Permalink
fix(readme): add reverse proxy example
Browse files Browse the repository at this point in the history
  • Loading branch information
felin-arch authored and Adam Brunner committed Sep 12, 2016
1 parent ef4ec62 commit 92e8551
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ This middleware is a wrapper for [koa-pug](https://github.com/chrisyip/koa-pug).
app.addEnforceSSLMiddleware();
```

If your application is running behind reverse proxy you should set the trustProxy configiration option for detecting the x-forwarded-proto header.
If your application is running behind reverse proxy (like Heroku) you should set the trustProxy configuration option to *true* in order to process the x-forwarded-proto header.

``` javascript
var app = new App(koaApp);
app.addEnforceSSLMiddleware({ trustProxy: true });
Expand Down

0 comments on commit 92e8551

Please sign in to comment.