Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strict and HSTS are incompatible #8

Closed
dacort opened this issue Dec 19, 2010 · 4 comments
Closed

strict and HSTS are incompatible #8

dacort opened this issue Dec 19, 2010 · 4 comments

Comments

@dacort
Copy link

dacort commented Dec 19, 2010

The :strict option and enabling HSTS by default are incompatible with each other and will result in infinite loops. As :strict tries to redirect the browser to http, the user's browser tries to redirect to https due to HSTS affecting any URL on the site.

As HSTS is fairly new and only supported by Chrome and Firefox nightlies, there should be a warning or the option to disable it when used together with :strict.

@pjammer
Copy link

pjammer commented Jan 27, 2011

i just get an infinite loop without specifying anything.

I simply use this in config/application.rb:

config.middleware.use Rack::SslEnforcer

and this in the gemfile

gem "rack-ssl-enforcer", :require => 'rack/ssl-enforcer'

I assume that is all i needed to do if i wanted full site ssl, correct?

If so, i get infinite loops with no useful production log warnings, even in :debug mode.

@marzdrel
Copy link

marzdrel commented Feb 5, 2011

Is there even a way to disable HSTS currently, without monkey patching? Looks like this gem is pretty useless, unless you want to force SSL on the whole site...

@thibaudgg
Copy link
Collaborator

fixed here: #16
Ok for you?

@rymai
Copy link
Collaborator

rymai commented Mar 8, 2012

@mdrozdziel HSTS is off by default, I close this issue since it's fixed for 1 year now! :)

@rymai rymai closed this as completed Mar 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants