通过curl设置nginx标头

I seem to have hit a brick wall in dealing with some headers. The only place where I can think the problem is, is the nginx configuration.

I am making the request via curl on the command line:

curl -H "user-id: 1" -H "user-token: $2y$10$VgXt0CfS7UOzhYQOuH9CaeNShB2Kohs3vhyL1l8W01QzD2KiKFOgG" http://dev.api/account

Using something like http Scoop I can see the request headers:

User-Agent → curl/7.30.0

user-session → $2y$10$VgXt0CfS7UOzhYQOuH9CaeNShB2Kohs3vhyL1l8W01QzD2KiKFOgG

user-id → 1

Host → dev.api

Accept → */*

Then response I get is

Cache-Control → no-cache

Connection → keep-alive

Content-Type → text/html; charset=UTF-8

Date → Fri, 20 Jun 2014 03:11:02 GMT

Server → nginx/1.6.0

Transfer-Encoding → chunked

X-Frame-Options → SAMEORIGIN

X-Powered-By → PHP/5.4.28

Is there anything in nginx that would prevent the headers from the request be passed to the response?

I don`t know mechanism for all header, but for special headers add directives to location or server context:

add_header user-session $http_user_session
add_header user-id $http_user_id
add_header Host %http_host