Support proxy app

This commit is contained in:
Johannes Zellner
2022-06-06 20:04:22 +02:00
parent 67801020ed
commit a955457ee7
5 changed files with 45 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ server {
location / {
<% if ( endpoint === 'dashboard' || endpoint === 'setup' ) { %>
return 301 https://$host$request_uri;
<% } else if ( endpoint === 'app' ) { %>
<% } else if ( endpoint === 'app' || endpoint === 'external' ) { %>
return 301 https://$host$request_uri;
<% } else if ( endpoint === 'redirect' ) { %>
return 301 https://<%= redirectTo %>$request_uri;
@@ -175,6 +175,8 @@ server {
proxy_pass http://127.0.0.1:3000;
<% } else if ( endpoint === 'app' ) { %>
proxy_pass http://<%= ip %>:<%= port %>;
<% } else if ( endpoint === 'external' ) { %>
proxy_pass <%= upstreamUri %>;
<% } else if ( endpoint === 'redirect' ) { %>
return 302 https://<%= redirectTo %>$request_uri;
<% } %>
@@ -326,6 +328,10 @@ server {
# to clear a permanent redirect on the browser
return 302 https://<%= redirectTo %>$request_uri;
}
<% } else if ( endpoint === 'external' ) { %>
location / {
proxy_pass <%= upstreamUri %>;
}
<% } else if ( endpoint === 'ip' ) { %>
location /notfound.html {
root <%= sourceDir %>/dashboard/dist;