Last active
November 29, 2022 17:59
-
-
Save nginx-gists/963e93a55ccf198e4bca3ab5bd282897 to your computer and use it in GitHub Desktop.
Announcing NGINX Plus R28
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
http { | |
map $proxy_protocol_tlv_aws_vpce_id $not_allowed_vpc_id { | |
"12341234" 0; | |
"12345678" 0; | |
default 1; | |
} | |
server { | |
listen 127.0.0.1:8080 proxy_protocol; | |
location / { | |
if ($not_allowed_vpc_id) { | |
return 401; | |
} | |
add_header X-AWS-VPC-LINK-ID $proxy_protocol_tlv_aws_vpce_id; | |
proxy_pass http://u; | |
} | |
} | |
upstream u { | |
server 127.0.0.1:8081; | |
} | |
} | |
# vim: syntax=nginx |
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
http { | |
map $http_user_agent $samesite { | |
"user-agent-1" "lax"; | |
"user-agent-2" ""; | |
} | |
upstream u { | |
server 127.0.0.1:8081; | |
sticky cookie sticky secure samesite=$samesite path=/test; | |
} | |
server { | |
listen 127.0.0.1:8080; | |
server_name localhost; | |
location / { | |
proxy_pass http://u; | |
} | |
} | |
} | |
# vim: syntax=nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment