Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I curl for a URL I get this answer back:

>
< HTTP/1.1 200 OK
< Server: nginx/0.7.65
< Date: Thu, 04 Mar 2010 12:18:27 GMT
< Content-Type: application/json
< Connection: close
< Expires: Thu, 04 Mar 2010 12:18:27 UTC
< http.context.path: /1/
< jersey.response: com.sun.jersey.spi.container.ContainerResponse@17646d60
< http.custom.headers: {Content-Type=text/plain}
< http.request.path: /2/messages/latest.json
< http.status: 200
< Transfer-Encoding: chunked

I want to remove

< http.context.path: /1/
< jersey.response: com.sun.jersey.spi.container.ContainerResponse@17646d60
< http.custom.headers: {Content-Type=text/plain}
< http.request.path: /2/messages/latest.json
< http.status: 200

So I used the proxy_hide_header directive in this way:

location / {
if ($arg_id) {
proxy_pass http..authorized;
break;
}
proxy_pass http..anonymous;
proxy_hide_header http.context.path;
proxy_hide_header jersey.response;
proxy_hide_header http.request.path;
proxy_hide_header http.status ;
}

But it doesn't work. any clues?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.