reverseproxy: adminOrigin is not used in the ejs
This commit is contained in:
@@ -42,7 +42,7 @@ server {
|
||||
|
||||
# for default server, serve the notfound page. for other endpoints, redirect to HTTPS
|
||||
location / {
|
||||
<% if ( endpoint === 'admin' || endpoint === 'setup' ) { %>
|
||||
<% if ( endpoint === 'dashboard' || endpoint === 'setup' ) { %>
|
||||
return 301 https://$host$request_uri;
|
||||
<% } else if ( endpoint === 'app' ) { %>
|
||||
return 301 https://$host$request_uri;
|
||||
@@ -128,8 +128,8 @@ server {
|
||||
# enable for proxied requests as well
|
||||
gzip_proxied any;
|
||||
|
||||
<% if ( endpoint === 'admin' || endpoint === 'ip' || endpoint === 'setup' ) { -%>
|
||||
# CSP headers for the admin/dashboard resources
|
||||
<% if ( endpoint === 'dashboard' || endpoint === 'ip' || endpoint === 'setup' ) { -%>
|
||||
# CSP headers for the dashboard resources
|
||||
add_header Content-Security-Policy "default-src 'none'; frame-src 'self' cloudron.io *.cloudron.io; connect-src wss: https: 'self' *.cloudron.io; script-src https: 'self' 'unsafe-inline' 'unsafe-eval'; img-src * data:; style-src https: 'unsafe-inline'; object-src 'none'; font-src https: 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self';";
|
||||
<% } else { %>
|
||||
<% if (cspQuoted) { %>
|
||||
@@ -172,7 +172,7 @@ server {
|
||||
}
|
||||
|
||||
location @wellknown-upstream {
|
||||
<% if ( endpoint === 'admin' ) { %>
|
||||
<% if ( endpoint === 'dashboard' ) { %>
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
<% } else if ( endpoint === 'app' ) { %>
|
||||
proxy_pass http://<%= ip %>:<%= port %>;
|
||||
@@ -208,7 +208,7 @@ server {
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if ( endpoint === 'admin' || endpoint === 'setup' ) { %>
|
||||
<% if ( endpoint === 'dashboard' || endpoint === 'setup' ) { %>
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
client_max_body_size 1m;
|
||||
|
||||
Reference in New Issue
Block a user