Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

undefined method `base_url' #36

Closed
pash opened this Issue · 4 comments

2 participants

@pash

Hello,

I'm running a rails app and after upgrading to rack-protection 1.3.1, I got this error.

FATAL [2012-12-12T00:42:16.097452 ] 12724 2462 Status: 500 Internal Server Error
FATAL [2012-12-12T00:42:16.097452 ] 12724 2462 undefined method base_url' for #<Rack::Request:0x007ff09468bac8>
FATAL [2012-12-12T00:42:16.097452 ] 12724 2462 /home/pash/.rvm/gems/ruby-1.9.2-p290@thenation/gems/rack-protection-1.3.1/lib/rack/protection/http_origin.rb:23:in
accepts?'
FATAL [2012-12-12T00:42:16.097452 ] 12724 2462 /home/pash/.rvm/gems/ruby-1.9.2-p290@thenation/gems/rack-protection-1.3.1/lib/rack/protection/base.rb:44:in call'
FATAL [2012-12-12T00:42:16.097452 ] 12724 2462 /home/pash/.rvm/gems/ruby-1.9.2-p290@thenation/gems/rack-protection-1.3.1/lib/rack/protection/xss_header.rb:27:in
call'

It's not happening in 1.2.0.

Also, it only happens when I'm using Safari (my version is 5.1.7). The page I'm loading is fine in Chrome and Firefox. Basically, I have a button that makes an ajax post request and it's broken in the latest version.

@rkh
Owner

What Rack version are you using?

@rkh rkh closed this in debff75
@pash

I was using rack 1.0.1. Thanks for looking at it.

@rkh
Owner

Hmmm... I checked for 1.1.3. It might work for 1.0.1, but you should really upgrade.

@pash

Sounds good. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.