# Header is not passed to proxy

**URL:** <https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474>\
**Category:** NGINX\
**Created:** [August 29, 2012, 6:42pm UTC](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474 "2012-08-29T18:42:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 29, 2012, 6:42pm UTC](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474/1 "2012-08-29T18:42:45Z")

</div>

Hi Maxim, thanks a lot for your moduel. it was extremely useful for me.

I have the following config:  
location /upload {  
auth\_request /auth;  
…  
location /auth {  
proxy\_pass ;  
}

The initial request to /upload has header. I have supposed this header  
to be  
propogated down to . But this does not happen.

Question: does it mean that i have to use $request\_uri instead of header  
propogation?

Thanks a lot!  
Oleksiy

Posted at Nginx Forum:

> **[Header is not passed to proxy](https://forum.nginx.org/read.php?2,230292,230292#msg-230292)**
>
> Hi Maxim, thanks a lot for your moduel. it was extremely useful for me. I have the following config: location /upload { auth\_request /auth; ... location /auth { proxy\_pass \<authserviceURL\>; }

---

<div class="post-metadata">

**Author:** ![mokriy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/848f3c/32.png) [@mokriy](https://www.ruby-forum.com/u/mokriy)\
**Post date:** [August 30, 2012, 12:32pm UTC](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474/2 "2012-08-30T12:32:06Z")

</div>

The header value should be in quotes:  
“$x\_your\_header”

Posted at Nginx Forum:

> **[Re: Header is not passed to proxy](https://forum.nginx.org/read.php?2,230292,230325#msg-230325)**
>
> Hi Maxim, thanks a lot for your moduel. it was extremely useful for me. I have the following config: location /upload { auth\_request /auth; ... location /auth { proxy\_pass \<authserviceURL\>; }

---

<div class="post-metadata">

**Author:** ![mokriy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/848f3c/32.png) [@mokriy](https://www.ruby-forum.com/u/mokriy)\
**Post date:** [August 31, 2012, 11:53pm UTC](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474/3 "2012-08-31T23:53:15Z")

</div>

Hello!

On Wed, Aug 29, 2012 at 12:42:28PM -0400, mokriy wrote:

> The initial request to /upload has header. I have supposed this header to be  
> propogated down to . But this does not happen.
> 
> Question: does it mean that i have to use $request\_uri instead of header  
> propogation?

I don’t really understand the question, but original request  
headers are passed to auth service by default. If it doesn’t work  
for you - probably you did something wrong.

Maxim D.
