Quantcast
Channel: Serverphorums.com - HAProxy
Viewing all articles
Browse latest Browse all 5112

Use server_name as variable or header value (no replies)

$
0
0
Hi Folks,

I'm trying to export the server_name as a response header or variable for
logging purposes ( %s in the log format ).

Is there a way to access this string in a manner similar to one of these
methods? I've tried the following without success (usually with a
"unknown fetch method %s".

http-response set-var(txn.servername) %s
or
http-response set-var(txn.servername) %[server_name]

The option "http-send-name-header" is very similar to what I would like to
do, but going in the "wrong direction" as I need it sent back to the
client that made the request.

I would appreciate any pointers or ideas!

Best Regards,
-Mark

Viewing all articles
Browse latest Browse all 5112

Trending Articles