About ignore_invalid_headers directive in SSL


I have a problem.

I have try ignore invalid headers with directive ignore_invalid_headers
in my configuration with SSL and dont get it working, however without
perfect work.

What could be the problem?


Posted at Nginx Forum:

Please be more specific about SSL “not working”.
What does actually happen?
Do you see errors in the Browser?
Do you see errors in access or error logs?
Would you post your relevant configuration please?

Also, sinceignore_invalid_headers has nothing to do with SSL
at all [2], why do you think are trying to fix a SSL related
problem with it? What do you expect from that command?

[2]Module ngx_http_core_module

Reread the documentation and what the flag is actually about. You are
disabling (off) a feature which IGNORES invalid header names. If you
rely on invalid header names, you need to enable this feature, not
disable it.

And btw, the feature is already on by default, so why don’t you just
remove it from the configuration?

Thatbeingsaid, you should absolutely not rely on invalid headers, since
that may break in certain browsers.
Are you perhaps confusing CUSTOM (X-blabla: asdasd) with INVALID header
names (broken-$%&/()-header-name: asdasd)?



When i say “not working” meant that not working ignore_invalid_headers
directive… not propage my customs headers.

My example:

server {

listen 443;
ssl on;
ssl_certificate my_public.crt;
ssl_certificate_key my_server.key;
server_name myservername;
ignore_invalid_headers off;
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;


Posted at Nginx Forum:

Thanks very much for all!

Effectively, it was because I had another virtualhost and was not
the flag. Now it working!


Posted at Nginx Forum:

On Wednesday 23 January 2013 15:29:18 sdeancos wrote:

listen 443;
proxy_set_header X-Scheme $scheme;


Is this the default server? Do you have other server blocks that listen
on 443?

Please note from the documentation:

“A directive can be specified on the server level in a default server.
In this
case, its value will cover all virtual servers listening on the same
and port.” @ Module ngx_http_core_module

wbr, Valentin V. Bartenev