rack-reverse-proxy icon indicating copy to clipboard operation
rack-reverse-proxy copied to clipboard

Headers work with nginx

Open ahawkins opened this issue 12 years ago • 0 comments

This fixes a big problem with nginx. nginx does not send some headers if they have an underscore in them. Since this is a Rack middleware, all headers will be converted into HTTP_FOO_BAR. The original header may have been Foo-Bar or Foo_Bar. We may never know. Actually is a very annoying problem with rack because you can't access the original headers. So, we simply replace _'s with - and everything is cool. Most likely the _'s were -'s in the first place.

ahawkins avatar Apr 18 '12 19:04 ahawkins