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 old { | |
server 10.0.0.1; | |
server 10.0.0.2; | |
} | |
upstream new { | |
server 10.0.0.9; | |
server 10.0.0.10; | |
} |
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
function kvAccess(r) { | |
var log = `${r.variables.time_iso8601} client=${r.remoteAddress} method=${r.method} uri=${r.uri} status=${r.status}`; | |
r.rawHeadersIn.forEach(h => log += ` in.${h[0]}=${h[1]}`); | |
r.rawHeadersOut.forEach(h => log += ` out.${h[0]}=${h[1]}`); | |
return log; | |
} | |
export default { kvAccess } |
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
log_format masked '$remote_addr_masked - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent"'; | |
js_import mask_ip_uri.js; | |
js_set $remote_addr_masked mask_ip_uri.maskRemoteAddress; | |
server { | |
listen 80; |
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
# Pull base image. The official docker openjdk-8 image is used here. | |
FROM java:8-jdk | |
# Copy HiveMQ to container | |
COPY hivemq.zip /tmp/ | |
#Install wget and unzip, then download and install HiveMQ. | |
RUN \ | |
apt-get install -y wget unzip &&\ | |
unzip /tmp/hivemq.zip -d /opt/ &&\ |
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
function parseCSKVpairs(cskvpairs, key) { | |
if ( cskvpairs.length ) { | |
var kvpairs = cskvpairs.split(','); | |
for ( var i = 0; i < kvpairs.length; i++ ) { | |
var kvpair = kvpairs[i].split('='); | |
if ( kvpair[0].toUpperCase() == key ) { | |
return kvpair[1]; | |
} | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Banned</title> | |
<style> | |
body { | |
width: 35em; | |
margin: 0 auto; | |
font-family: Tahoma, Verdana, Arial, sans-serif; | |
} |
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
match homepage_etag { | |
header ETag = '"58ad6e69-264"'; | |
} | |
upstream my_website { | |
server 10.0.0.1:80; | |
zone health 64k; # Allow workers to share health info | |
} | |
server { |
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
auth_jwt "Closed site"; | |
auth_jwt_key_file /etc/nginx/azure.jwk; | |
# vim: syntax=nginx |
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
# This NGINX Plus configuration implements route-based session persistence | |
# and enables the NGINX Plus API. Because the NGINX Plus API is used to | |
# dynamically configure the servers in the upstream group, servers are not | |
# defined statically in this file. | |
# To add an upstream server, run this command, replacing | |
# <IP-ADDRESS:PORT> and <API-VERSION> with appropriate values: | |
# | |
# curl -sX POST -d '{"server":"<IP-ADDRESS:PORT>", "route":"www.example.com"}' http://127.0.0.1:8888/api/<API-VERSION>/http/upstreams/vhosts/servers |
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 warehouse_inventory { | |
zone inventory_service 64k; | |
server 10.0.0.1:80; | |
server 10.0.0.2:80; | |
server 10.0.0.3:80; | |
} | |
upstream warehouse_pricing { | |
zone pricing_service 64k; | |
server 10.0.0.7:80; |
OlderNewer