- !gamble
- !slot
- !roll
- !adventure
- !roulette
- !kill
This file contains 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
map $request_id $formatted_id { | |
"~*(?<p1>[0-9a-f]{8})(?<p2>[0-9a-f]{4})(?<p3>[0-9a-f]{4})(?<p4>[0-9a-f]{4})(?<p5>.*)$" "${p1}-${p2}-${p3}-${p4}-${p5}"; | |
} | |
map $http_x_request_id $uuid { | |
default "${formatted_id}"; | |
~* "${http_x_request_id}"; | |
} |
This file contains 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
map $http_x_request_id $uuid { | |
default "${request_id}"; | |
~* "${http_x_request_id}"; | |
} | |
server { | |
listen 80; | |
server_name _; | |
proxy_set_header X-Request-ID $uuid; |
This file contains 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
server { | |
status_zone purger; | |
listen 80; | |
server_name purger.local; | |
allow 127.0.0.1; | |
allow 172.16.0.0/24; # NGINX+ Network | |
deny all; |
This file contains 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
lua_package_cpath '/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;;'; |
This file contains 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
upstream caches { | |
zone caches 32k; | |
server service.consul service=cache resolve; | |
} |
This file contains 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
resolver consul:8600 valid=2s ipv6=off; | |
resolver_timeout 2s; | |
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=default:10m max_size=50m; | |
upstream backends { | |
zone backends 32k; | |
server service.consul service=backend resolve; | |
} |
This file contains 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
curl -X PURGE -H 'Host: purger.local' http://127.0.0.1/uri/to/purge/index.html |
This file contains 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
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=default:10m max_size=50m; | |
upstream backends { | |
server service.consul service=backend resolve; | |
} | |
map $request_method $purge_method { | |
PURGE 1; | |
default 0; | |
} |
This file contains 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
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=default:10m max_size=50m; | |
upstream backends { | |
server service.consul service=backend resolve; | |
} | |
server { | |
status_zone default; | |
listen 80; |