Skip to content

Commit 88d8736

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/deploy-local-build/default.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ server {
6262
resolver 1.1.1.1; # 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)