diff --git a/bundles/nginx/files/nginx.conf b/bundles/nginx/files/nginx.conf index dae0a26..3f4a9a9 100644 --- a/bundles/nginx/files/nginx.conf +++ b/bundles/nginx/files/nginx.conf @@ -10,9 +10,6 @@ events { http { include /etc/nginx/mime.types; - types { - application/javascript js mjs; - } default_type application/octet-stream; charset UTF-8; override_charset on; diff --git a/bundles/nginx/files/site_template b/bundles/nginx/files/site_template index a967893..96875c8 100644 --- a/bundles/nginx/files/site_template +++ b/bundles/nginx/files/site_template @@ -149,18 +149,18 @@ server { % if 'target' in options: proxy_pass ${options['target']}; proxy_http_version ${options.get('http_version', '1.1')}; - proxy_set_header Host ${domain}; + proxy_set_header Host ${options.get('proxy_pass_host', domain)}; % if options.get('websockets', False): proxy_set_header Connection "upgrade"; proxy_set_header Upgrade $http_upgrade; % endif proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host ${options.get('x_forwarded_host', domain)}; + proxy_set_header X-Forwarded-Host ${options.get('x_forwarded_host', options.get('proxy_pass_host', domain))}; % for option, value in options.get('proxy_set_header', {}).items(): proxy_set_header ${option} ${value}; % endfor -% if location != '/': +% if location != '/' and location != '= /': proxy_set_header X-Script-Name ${location}; % endif proxy_buffering off;