-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Redirected from https to https #41
Comments
A clarification: in fact the communication is encrypted downstream of the web server. So the server receive an http request, not a https. Is there a way to configure the gem to force the devise_cas_authenticatable to generate the correct redirection after login? |
Ah, ok. I was looking at the code and seeing that cas_service_url does take into account the URL scheme used for the request, so I was confused as to what might be going wrong. But if the Ruby web server is in fact receiving an HTTP request, that would explain it. There is probably a request header being set that tells Rails which URL is being proxied for, but that might depend on which proxy server you're using. Can you see something that looks like that in the request headers? If so, we may be able to implement smarter detection for this, assuming it's relatively consistent across proxy servers. If not, perhaps there's a Rack middleware or a Rails configuration parameter that can help with this by fooling Rails into thinking it's serving at the proxied URL. |
I don't know if your'e using nginx, but this may be helpful to fixing your issue without needing to do a code change: http://stackoverflow.com/questions/6330595/how-to-fix-sinatra-redirecting-https-to-http-under-nginx |
@iwan Did you try adding the below to your
|
Before login i am on a public area secure page like:
When click on a "Login" button i'll be redirect to the CAS service:
And after successful login i lost my secure protocol, and i am redirected to
consistently with the URL generated by the application,
in place of
Here is my config settings:
thanks,
best regards,
iwan
The text was updated successfully, but these errors were encountered: