From 02e7ed7030ac2156123e63544afce959cd9c3d4e Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Fri, 27 Jun 2025 20:23:29 +0200 Subject: [PATCH] Fix support for https and http endpoints --- src/Vegasco-Web/Dockerfile | 2 ++ src/Vegasco-Web/webserver.conf.template | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Vegasco-Web/Dockerfile b/src/Vegasco-Web/Dockerfile index c3bdda0..2384f71 100644 --- a/src/Vegasco-Web/Dockerfile +++ b/src/Vegasco-Web/Dockerfile @@ -12,6 +12,8 @@ RUN rm /etc/nginx/conf.d/* ENV DOLLAR=$ WORKDIR /usr/share/nginx/html +ENV services__Api__https__0="" +ENV services__Api__http__0="" COPY --from=build /usr/local/app/dist/Vegasco-Web/browser . COPY nginx.conf /etc/nginx/nginx.conf COPY webserver.conf.template /etc/nginx/templates/webserver.conf.template diff --git a/src/Vegasco-Web/webserver.conf.template b/src/Vegasco-Web/webserver.conf.template index 69d9a51..65c6702 100644 --- a/src/Vegasco-Web/webserver.conf.template +++ b/src/Vegasco-Web/webserver.conf.template @@ -1,9 +1,17 @@ -map ${services__Api__https__0} ${DOLLAR}apiUrl { - ~.+ ${services__Api__https__0}; +map "write-something-here-so-it-is-not-empty" ${DOLLAR}httpsUrl { + default "${services__Api__https__0}"; } -map ${services__Api__http__0} ${DOLLAR}apiUrl { - ~.+ ${services__Api__http__0}; +map "write-something-here-so-it-is-not-empty" ${DOLLAR}httpUrl { + default "${services__Api__http__0}"; +} + +map ${DOLLAR}httpUrl ${DOLLAR}apiUrl { + ~(.+) ${DOLLAR}1; +} + +map ${DOLLAR}httpsUrl ${DOLLAR}apiUrl { + ~(.+) ${DOLLAR}1; } server {