简体   繁体   中英

Devise redirects to https instead of http

I'm facing an issue and after some searches I couldn't find a solution. It's the first time I deploy an app using Devise and the behavior for the login/logout & registration is kinda strange. In fact when I'm trying to do one of these 3 actions, the browser redirect me to the desired page but with HTTPS instead of HTTP.

In my production.rb I added this line :

config.action_mailer.default_url_options = { host: 'sd.foo.bar' }

I checked in config files and I couldn't figure why http is active for that 3 cases because in other page, the navigation works as expected with HTTP. I don't really know if I made a mistake or something like that but any help would be appreciate here. Thanks in advance.

Ok so I found a solution. I know this is know known as a best practice and I should stop doing that but in my precise case, It's juste a very small application for me and 2/3 friends so I don't really need SSL. I just add a rule in nginx to redirect ssl requests to the port 80 and it solved everything.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM