This project is archived and is in readonly mode.
polymorphic_url does not take https into consideration when generating the URL
Reported by modsaid | July 12th, 2010 @ 10:44 AM
I'm running a Rails 2.3.5 application (redmine).. and It is accessible only via https as configured in my nginx.
The problem is that some plugins use polymorphic_url helper to dynamically generate full URLs for relevant ajax requests. This lead to the Ajax always failing with 302 (redirect from http to https by nginx)
An alternative is to use polymorphic_path. and I'll do that for now.
But the point is, if I open browsing my web application through https, polymorphic_url should grab the protocol from the request (like it did with the domain). That's logical but is not currently the way it works.
Thanks
Comments and changes to this ticket
-
Marjan Krekoten' September 16th, 2010 @ 02:08 PM
Well this is not Rails issue. You should tell nginx to set X-Forwarded-For header so Rails will know that https is being used.
location / { # ... proxy_set_header X-Forwarded-For https # ... }
-
David Trasbo September 25th, 2010 @ 06:50 PM
- State changed from new to invalid
- Importance changed from to Low
Marking this
invalid
for now. Please try what Marjan describes. If it turns out to be a Rails issue I'll re-open.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>