Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 413 Bytes

Readme.md

File metadata and controls

11 lines (8 loc) · 413 Bytes

Nginx JQ

Takes an nginx file and turns it into json

For example to search for any proxy header of ldap

 go get -v github.com/rotem-cider/nginx-jq
 wget https://raw.githubusercontent.com/rotem-cider/nginx-jq/main/tests/nginx.conf
./nginx-jq nginx.conf | jq -r ".. | (select(.Name==\"proxy_set_header\"))? | select(.Parameters[0] | startswith(\"X-Ldap\")) | [.Parameters[0], .Parameters[1]] | @csv"