Override Content-Type header with proxied requests
manish-ezest
nginx-forum at nginx.us
Thu Aug 7 18:17:32 UTC 2014
Hi Wandenberg,
As you suggested I added "proxy_hide_header Content-Type;" in location / {}
directive and I am getting 200 but how would I check what is the
Content-Type. I usually check with curl command. But with curl command I
don't find the Content-Type since it is hidden now. Is there any other way
to confirm the changes?
[root at LOCALHOST ~]# curl -v http://www.aaa.com/aaa/bbb/ccc/ddd/eee/fff.json
* Hostname was NOT found in DNS cache
* Trying 5.5.5.5...
* Connected to www.aaa.com (5.5.5.5) port 80 (#0)
> GET /content/unittests/maja-test/essdev-2668/test2.json HTTP/1.1
> User-Agent: curl/7.36.0
> Host: www.aaa.com
> Accept: */*
>
< HTTP/1.1 200 OK
* Server nginx is not blacklisted
< Server: nginx
< Date: Thu, 07 Aug 2014 18:06:53 GMT
< Content-Length: 603
< Connection: keep-alive
< Keep-Alive: timeout=5
< x-amz-id-2:
6h0Xzm+Sa6+C7fPeocKD0iNJIRhm6thHqa1GJB+aOrOKwrT8T6YL2Lp2M74UlD39
< x-amz-request-id: 62A0E211E69B6F9B
< x-amz-meta-md5-hash: ab9b7b2c58d3a481e172aea95b1e87a0
< Last-Modified: Fri, 25 Jul 2014 13:18:14 GMT
< ETag: "ab9b7b2c58d3a481e172aea95b1e87a0"
< Accept-Ranges: bytes
< Expires: Fri, 08 Aug 2014 18:06:53 GMT
<
{
JSON CONTENTS
* Connection #0 to host www.aaa.com left intact
}
--Manish
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239473,252395#msg-252395
More information about the nginx
mailing list