From f9e05c0a9dec410462f9c5ea8d563fb3ada136c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Tue, 23 Jul 2024 16:58:58 +0200 Subject: [PATCH] Fix protocol handling for NextJS --- Dockerfile | 2 +- context/nextjs/etc/nginx/templates/default.conf.template | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f62014e..a122cf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,4 +41,4 @@ FROM proxy AS nextjs COPY /nextjs / -ENV NGINX_PROXY_PASS app:3000 +ENV NGINX_PROXY_PASS http://app:3000 diff --git a/context/nextjs/etc/nginx/templates/default.conf.template b/context/nextjs/etc/nginx/templates/default.conf.template index db2b91d..5911c45 100644 --- a/context/nextjs/etc/nginx/templates/default.conf.template +++ b/context/nextjs/etc/nginx/templates/default.conf.template @@ -5,11 +5,11 @@ server { root /var/www/web; location / { - proxy_pass http://${NGINX_PROXY_PASS}; + proxy_pass ${NGINX_PROXY_PASS}; } location /_next/webpack-hmr { - proxy_pass http://${NGINX_PROXY_PASS}; + proxy_pass ${NGINX_PROXY_PASS}; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade";