I'm working on the client side, the server had been applied with SSL.
In my client, If the server is secured with SSL, the https shall be used
automatically, or say "redirecting";
otherwise only use http to access the server.
I didn't know how to implement.
I want to using ssl_required plugin as some direction, but not succeed.
I installed ssl_requirement plugin.
Then in coding as:
class MyController < ApplicationController
##I tried ssl_required :update An error occurred, saying:
##The page is temporarily unavailable. (IIS-404)
##while for ssl_allowed :update the https still can't be used, only go
respond_to do |format|
redirect_to ( RelativeUrlfromLocalHost )
It doesn't work.
In ssl_required plugin, I saw the judgment :
if ssl_required? && !request.ssl?
However, I'm not clear what is request here ? How can I "bind" it to
my accessing server.
Is there anyone can help me?