Skip to content

Commit 587c206

Browse files
authored
Disable IPv6 for GCS upstream resolver (#22)
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
1 parent 4c52912 commit 587c206

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

root-files/opt/flownative/lib/nginx-legacy.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ EOM
227227
}
228228
# pass persistent resource requests to the custom endpoint (S3, Minio, GCS ...)
229229
location ~* "^${BEACH_PERSISTENT_RESOURCES_BASE_PATH}([a-f0-9]{40})/" {
230-
resolver ${BEACH_ASSET_PROXY_RESOLVER};
230+
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
231231
proxy_set_header Authorization "";
232232
add_header Via 'Beach Asset Proxy';
233233
${addHeaderStrictTransportSecurity}
@@ -244,7 +244,7 @@ EOM
244244
}
245245
# pass persistent resource requests to GCS
246246
location ~* "^${BEACH_PERSISTENT_RESOURCES_BASE_PATH}([a-f0-9]{40})/" {
247-
resolver ${BEACH_ASSET_PROXY_RESOLVER};
247+
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
248248
proxy_set_header Authorization "";
249249
add_header Via 'Beach Asset Proxy';
250250
${addHeaderStrictTransportSecurity}
@@ -266,7 +266,7 @@ EOM
266266
set \$assetUri ${BEACH_PERSISTENT_RESOURCES_FALLBACK_BASE_URI}\$1;
267267
add_header Via 'Beach Asset Fallback';
268268
${addHeaderStrictTransportSecurity}
269-
resolver ${BEACH_ASSET_PROXY_RESOLVER};
269+
resolver ${BEACH_ASSET_PROXY_RESOLVER} ipv6=off;
270270
proxy_pass \$assetUri;
271271
}
272272
EOM

0 commit comments

Comments
 (0)