rack-ssl-enforcer icon indicating copy to clipboard operation
rack-ssl-enforcer copied to clipboard

Middleware use vs. insert_before

Open toncid opened this issue 6 years ago • 1 comments

Based on the README file, the SslEnforcer should be prepended into the middleware chain via insert_before:

config.middleware.insert_before  ActionDispatch::Cookies, Rack::SslEnforcer

But then all subsequent examples rely on use:

config.middleware.use Rack::SslEnforcer, :only_hosts => 'api.example.com'
...

Could you please explain what the proper/expected way of setting up the middleware is?

toncid avatar Jan 23 '19 11:01 toncid

Seems like #90 caused this discrepancy.

toncid avatar Jan 23 '19 13:01 toncid