diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf index ec30cca0..9f36a072 100644 --- a/backend/templates/proxy_host.conf +++ b/backend/templates/proxy_host.conf @@ -1,30 +1,39 @@ {% include "_header_comment.conf" %} +map $sent_http_content_type $expires { + default off; + text/html epoch; + text/css max; + application/javascript max; + ~image/ max; + ~font/ max; +} + {% if enabled %} server { set $forward_scheme {{ forward_scheme }}; set $server "{{ forward_host }}"; set $port {{ forward_port }}; -{% include "_listen.conf" %} -{% include "_certificates.conf" %} -{% include "_assets.conf" %} -{% include "_exploits.conf" %} -{% include "_hsts.conf" %} -{% include "_forced_ssl.conf" %} + {% include "_listen.conf" %} + {% include "_certificates.conf" %} + {% include "_assets.conf" %} + {% include "_exploits.conf" %} + {% include "_hsts.conf" %} + {% include "_forced_ssl.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; + proxy_set_header Upgrade $http_upgrade; + 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; -{{ advanced_config }} + {{ advanced_config }} -{{ locations }} + {{ locations }} {% if use_default_location %}