add proxy feature to nginx
This commit is contained in:
parent
3523edbcb4
commit
85b3adf671
3 changed files with 24 additions and 4 deletions
|
@ -17,12 +17,27 @@ server {
|
|||
ssl_stapling_verify on;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31104000; preload";
|
||||
add_header Referrer-Policy same-origin;
|
||||
add_header X-Frame-Options "DENY";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
alias /var/lib/dehydrated/acme-challenges/;
|
||||
}
|
||||
|
||||
% if proxy:
|
||||
% for location, proxy_pass in proxy.items():
|
||||
location ${location} {
|
||||
proxy_pass ${proxy_pass};
|
||||
proxy_set_header X-Script-Name /;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto HTTPS;
|
||||
proxy_set_header X-Forwarded-Host ${domain};
|
||||
proxy_buffering off;
|
||||
}
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
% if extras:
|
||||
<%include file="extras/${node.name}/${domain}" />
|
||||
% endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue