Skip to content

Instantly share code, notes, and snippets.

@eoftedal
eoftedal / default.conf
Last active April 20, 2020 16:50
Automatically adding forwarded/created x-b3-traceid to proxy_pass in nginx
map $http_x_b3_traceid $b3traceid {
"~^(?<traceid>[a-f0-9]{32})$" $traceid;
default $request_id;
}
proxy_set_header x-b3-traceId $b3traceid;
let isAdmin = false
/*‮ } ⁦if(isAdmin)⁩ ⁦ begin admins only */
console.log("you are an admin")
/* end admin only ‮ { ⁦ */