-
Notifications
You must be signed in to change notification settings - Fork 97
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
Running code before redirect not working #70
Comments
You're probably right, the |
abhasg
pushed a commit
to abhasg/rack-ssl-enforcer
that referenced
this issue
Apr 2, 2014
I have sent a pull request so that it will run properly. Have a look if that solution can be used. Will be waiting for your response. |
tobmatth
added a commit
that referenced
this issue
Apr 22, 2014
Fixing issue #70 - Running code before redirect not working
Merged in, thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I am using rails 3.2.17 and ruby 1.9.3-p484, when I tried to keep the flash with method you have given in README section
Running code before redirect not working
its giving @request variable as nil object. Here is my application code:-config.middleware.use Rack::SslEnforcer, :only => [%r{^/bla/bla/bla/}], :mixed => true, :before_redirect => Proc.new { #keep flash on redirect @request.session[:flash].keep if [email protected]? && @request.session.key?('flash') && [email protected]['flash'].empty? }
Using rack-ssl-enforcer 0.2.6 getting error
undefined method "session" for nill Class
. Tried to inspect the @request object in Proc it is giving nil. Can you please help me with this issue?The text was updated successfully, but these errors were encountered: