Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

undefined method `base_url' #36

pash opened this Issue Dec 12, 2012 · 4 comments


None yet
2 participants

pash commented Dec 12, 2012


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:inaccepts?'
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:incall'

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 commented Dec 12, 2012

What Rack version are you using?

@rkh rkh closed this in debff75 Dec 12, 2012

pash commented Dec 12, 2012

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


rkh commented Dec 12, 2012

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

pash commented Dec 12, 2012

Sounds good. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment