Rails 2.3 is not using right protocol ssl when using resource_url -


on rails 2.3 application have simple code

redirect_to resource_url(resource) 

i make request using ssl connection (https) redirects non ssl version (http)

i checked , resource_url throwing http without ssl.

how rails knows if protocol https? setup uses nginx , 3 mongrels load balancers.

i wonder if issue mongrel instances uses http.

is there way let mongrel instances know connection nginx ssl?

is issue?

this caused because nginx configured load balancer. browser makes ssl connection nginx, nginx make internal connection through http mongrel instances, , don't know if original connection on ssl.

the solution add nginx config

 proxy_set_header x-forwarded-proto $scheme; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -