Skip to content

Instantly share code, notes, and snippets.

@nginx-gists
Last active November 29, 2022 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nginx-gists/963e93a55ccf198e4bca3ab5bd282897 to your computer and use it in GitHub Desktop.
Save nginx-gists/963e93a55ccf198e4bca3ab5bd282897 to your computer and use it in GitHub Desktop.
Announcing NGINX Plus R28
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
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