Merge branch 'oc-main' into hsts_to_serverdef

This commit is contained in:
Nick Craig
2023-05-03 11:25:06 -04:00
committed by GitHub
121 changed files with 3754 additions and 3760 deletions

View File

@@ -4,6 +4,7 @@
server {
set $forward_scheme {{ forward_scheme }};
set $server "{{ forward_host }}";
set $path "{{ forward_path }}";
set $port {{ forward_port }};
{% include "_listen.conf" %}
@@ -19,37 +20,33 @@ proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
{% endif %}
access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
#disabling individual logs
#access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
#error_log /data/logs/proxy-host-{{ id }}_error.log warn;
{{ advanced_config }}
# Proxy!
{% if forward_proxy_header == 1 or forward_proxy_header == true %}
proxy_set_header Host $host;
{% else %}
proxy_set_header Host $proxy_host;
{% endif %}
include conf.d/include/proxy.conf;
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
{% endif %}
{{ locations }}
{% if use_default_location %}
location / {
{% if access_list_id > 0 %}
{% if access_list.items.length > 0 %}
# Authorization
auth_basic "Authorization required";
auth_basic_user_file /data/access/{{ access_list_id }};
{{ access_list.passauth }}
{% endif %}
# Access Rules
{% for client in access_list.clients %}
{{- client.rule -}};
{% endfor %}deny all;
# Access checks must...
{% if access_list.satisfy %}
{{ access_list.satisfy }};
{% endif %}
{% endif %}
{% include "_access.conf" %}
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
proxy_set_header Upgrade $http_upgrade;
@@ -59,7 +56,8 @@ proxy_http_version 1.1;
# Proxy!
include conf.d/include/proxy.conf;
}
}
{% endif %}
# Custom