Skip to content

Commit 28a8909

Browse files
committed
Fix proxy configuration to prevent 502 Bad Gateway errors
1 parent d32ed2b commit 28a8909

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker/deploy-local-build/default.conf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ server {
5959

6060
# Proxy configuration for Docker Hub API requests with caching.
6161
location /v2/namespaces/pegi3s/repositories {
62-
resolver 1.1.1.1; # DNS resolver for domain name lookup.
62+
resolver 1.1.1.1 ipv6=off; # DNS resolver for domain name lookup.
6363
set $upstream_endpoint https://hub.docker.com; # The upstream service to proxy requests to.
6464

65+
# Required to avoid 502 Bad Gateway errors
66+
proxy_set_header Host hub.docker.com;
67+
proxy_ssl_server_name on;
68+
proxy_ssl_name hub.docker.com;
69+
6570
# Enable proxy caching
6671
proxy_cache dockerhub_cache;
6772
proxy_cache_valid 200 302 10m; # Cache 200 and 302 responses for 10 minutes

0 commit comments

Comments
 (0)