Nginx proxy_hide_header not worked at a field included whitespace

I have a proxy with nginx for a upstream.The upstream will return a invalid header :"Time : Tue Oct 18 11:24:50 CST 2022", This is the response headers.

HTTP/1.1 200 OK Server: nginx/1.21.0 Date: Sat, 01 Apr 2023 16:47:07 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive Cache-Control: no-cache Time : Tue Oct 18 11:24:50 CST 2022 

I need to remove the "Time " header.

location / { proxy_hide_header "Time "; proxy_pass server...; } 

But it dose not work.

3

Related questions 1138 Node.js + Nginx - What now? 135 Nginx upstream prematurely closed connection while reading response header from upstream, for large requests 4 NGINX proxy_pass not caching content Related questions 1138 Node.js + Nginx - What now? 135 Nginx upstream prematurely closed connection while reading response header from upstream, for large requests 4 NGINX proxy_pass not caching content 35 Enable gzip compression with Nginx 10 Nginx how to completly disable Proxy caching 644 Nginx -- static file serving confusion with root & alias 0 Apache / Nginx / Varnish - GZIP does not work on css, js Load 4 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like