Add field to configure the reverse proxy

part of #596
This commit is contained in:
Girish Ramakrishnan
2019-10-13 18:22:03 -07:00
parent 7383cc4e90
commit 9c12f1fe15
11 changed files with 177 additions and 42 deletions

View File

@@ -97,6 +97,16 @@ server {
<% if ( endpoint === 'admin' ) { -%>
# CSP headers for the admin/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 (frameAncestorsQuoted) { %>
add_header Content-Security-Policy "Frame-ancestors <%= frameAncestorsQuoted %>";
<% } else { %>
add_header Content-Security-Policy "Frame-ancestors 'self'";
<% } %>
<% for (var i = 0; i < hiddenUpstreamHeaders.length; i++) { -%>
proxy_hide_header <%= hiddenUpstreamHeaders[i] %>;
<% } %>
<% } -%>
proxy_http_version 1.1;