This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onRequest(request, response) { | |
var clientIPaddr = null, | |
clientProxy = null; | |
// is client going through a proxy? | |
if (request.headers['via']) { // yes | |
clientIPaddr = request.headers['x-forwarded-for']; | |
clientProxy = request.headers['via']; | |
} else { // no | |
clientIPaddr = request.connection.remoteAddress; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list unique resource domains | |
jq '.log.entries[].request | {method,url}' $1 | jq 'if .method=="GET" then .url else "" end' | grep -Eo "http(s?)://([^/]+)./" | sort | uniq |