Forum: NGINX map or not map?

17b10ca0a9a645f7473a239853fc1722?d=identicon&s=25 unknown (Guest)
on 2014-03-06 19:25
(Received via mailing list)
Hi,

To help with debbuging, I'm adding an header like this (multiple nginx
behind a load balancer)
add_header X-Served-By $hostname

$hostname are like 'myserverXX',
how can i put only the XX instead of full $hostname (to put less
informations)

Is using map the only solution (i'm looking for a simple regexp)?

Thanks in advance
Etienne
34011bc56457235a2caa5ed1d4a29f3c?d=identicon&s=25 Jonathan Matthews (Guest)
on 2014-03-07 00:29
(Received via mailing list)
On 6 March 2014 18:24, <etienne.champetier@free.fr> wrote
> Is using map the only solution (i'm looking for a simple regexp)?

For this, a map is the /best/ solution!

J
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.