Welcome! Log In Create A New Profile

Advanced

header with underscore

Daniele Melosi
January 27, 2011 03:46AM
Hi all,

when proxy from nginx, if the headers contains underscore it won't be
passed:
$ curl -s http://proxy01.ced:8888/check_headers.php --header "Host:
myhost" --header "X_UP_CALLING_LINE_ID: daniele" | grep daniele

$ curl -s http://proxy01.ced:8888/check_headers.php --header "Host:
myhost" --header "X-UP-CALLING-LINE-ID: daniele" | grep daniele
[HTTP_X_UP_CALLING_LINE_ID] => daniele


This is my configuration:
server {
listen 8888;
server_name proxy01.ced;

keepalive_timeout 0;
ssi off;

underscores_in_headers on;

location ~ / {
proxy_pass http://test01.ced$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Org-host $host;
proxy_set_header X-Org-uri $request_uri;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_pass_header Server;
proxy_set_header X-UP-CALLING-LINE-ID
$HTTP_X_UP_CALLING_LINE_ID;
}
}

I tried to play with:
- underscores_in_headers on|off
- proxy_set_header X-UP-CALLING-LINE-ID $HTTP_X_UP_CALLING_LINE_ID
- proxy_pass_header X-UP-CALLING-LINE-ID (also with underscore)

lines but without any fortune :)

Do you have any hits ?

Regards

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

header with underscore

Daniele Melosi January 27, 2011 03:46AM

Re: header with underscore

Igor Sysoev January 27, 2011 05:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready