Skip to content

Commit

Permalink
Disable IPv6 for GCS upstream resolver (#22)
Browse files Browse the repository at this point in the history
DNS lookups for storage.googleapis.com will randomly result in IPv4 or IPv6 addresses, however our clusters currently only support IPv4 for egress traffic from pods. Therefore, switch off IPv6 for those resolvers.
https://nginx.org/en/docs/http/ngx_http_core_module.html
  • Loading branch information
robertlemke authored Jun 3, 2024
1 parent 4c52912 commit 587c206
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions root-files/opt/flownative/lib/nginx-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ EOM
}
# pass persistent resource requests to the custom endpoint (S3, Minio, GCS ...)
location ~* "^${BEACH_PERSISTENT_RESOURCES_BASE_PATH}([a-f0-9]{40})/" {
resolver ${BEACH_ASSET_PROXY_RESOLVER};
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
proxy_set_header Authorization "";
add_header Via 'Beach Asset Proxy';
${addHeaderStrictTransportSecurity}
Expand All @@ -244,7 +244,7 @@ EOM
}
# pass persistent resource requests to GCS
location ~* "^${BEACH_PERSISTENT_RESOURCES_BASE_PATH}([a-f0-9]{40})/" {
resolver ${BEACH_ASSET_PROXY_RESOLVER};
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
proxy_set_header Authorization "";
add_header Via 'Beach Asset Proxy';
${addHeaderStrictTransportSecurity}
Expand All @@ -266,7 +266,7 @@ EOM
set \$assetUri ${BEACH_PERSISTENT_RESOURCES_FALLBACK_BASE_URI}\$1;
add_header Via 'Beach Asset Fallback';
${addHeaderStrictTransportSecurity}
resolver ${BEACH_ASSET_PROXY_RESOLVER};
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
proxy_pass \$assetUri;
}
EOM
Expand Down

0 comments on commit 587c206

Please sign in to comment.