Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Help grabbing single option from upstream header.

$
0
0
Hello, new to the forum.... I have a header being sent from the upstream server that looks like this:

x-authorization:Client="Web Client", Device="Chrome 47.0.2526.106", DeviceId="3a3591f34aa7bf0cbda943edb993dbf11ecf0f4e", Version="3.0.5805.0", UserId="1de587e5988kdsede6f60a4f50d545e0"

I need to grab the "UserId" value ONLY, and log it in the nginx access log in place of the normal $remote_user.

Some more info, I do not have access to change the upstream headers, otherwise i would just create a new userid header. This is what I have to work with.. :-)


Any help would be greatly appreciated.. I really have no clue how to even start on this one.. lol

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>