I am on http when I send the Ajax request. About the same origin policy,
I thought Rails/Nginx would switch it over to HTTPS protocol as the
request is being sent to an action that requires SSL(ie.
SessionsController:create is set up with ssl_required).
If my above understanding is not correct, then should I be first
switching the page to HTTPs and then send the Ajax request? To test
that, I issued "location.href=location.href.replace('http:','https:');"
at browser's console to switch, which does switch to https://mysite.com;
but the page is empty and has only "Welcome to nginx!".
I added "root /my_public_dir; passenger_enabled on;" in nginx.conf and
reloaded https://mysite.com. The result was "403 Forbidden" this time!
Am I on the right track here? How do I get the Rails/nginx to show the
same page when I switch to https?
If you or anyone else can shed some light on my questions here and
previous post on this thread, it will be much appreciated. A good
tutorial on Ajax + SSL for Rails/Javascript is much needed, there is a
huge info gap on this on the web.
Many thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment