fix(nginx): add public DNS fallback for upstream resolution #13
+7
-5
@@ -19,11 +19,13 @@ server {
|
|||||||
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
||||||
add_header X-Robots-Tag "noindex, nofollow" always;
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
||||||
|
|
||||||
# Use the cluster CoreDNS resolver so upstream hostnames are resolved
|
# Use the cluster CoreDNS resolver for in-cluster Services AND public
|
||||||
# lazily (per-request), not at nginx startup. The proxy_pass targets below
|
# resolvers as fallback for external hostnames (demo.flow-master.ai etc.).
|
||||||
# use $variable form to force this lazy resolution; otherwise nginx fails
|
# k3s CoreDNS by default forwards external lookups, but if the forward
|
||||||
# to start when cluster DNS is briefly unavailable (e.g. node recovery).
|
# is missing the proxy_pass to demo.flow-master.ai fails with 502/504.
|
||||||
resolver 10.43.0.10 valid=30s ipv6=off;
|
# Listing public resolvers alongside ensures lookups succeed in both
|
||||||
|
# cases. Targets use $variable form to force lazy per-request resolution.
|
||||||
|
resolver 10.43.0.10 1.1.1.1 8.8.8.8 valid=30s ipv6=off;
|
||||||
|
|
||||||
# Reverse-proxy /api to the demo backend so live mode is same-origin.
|
# Reverse-proxy /api to the demo backend so live mode is same-origin.
|
||||||
location /api/ {
|
location /api/ {
|
||||||
|
|||||||
Reference in New Issue
Block a user