diff --git a/mopidy/rootfs/etc/nginx/ha-auth.lua b/mopidy/rootfs/etc/nginx/ha-auth.lua index 4e066b8..dab07da 100644 --- a/mopidy/rootfs/etc/nginx/ha-auth.lua +++ b/mopidy/rootfs/etc/nginx/ha-auth.lua @@ -36,7 +36,7 @@ function authenticate() body = ngx.encode_args({["username"]=username, ["password"]=password}), headers = { ["Content-Type"] = "application/x-www-form-urlencoded", - ["X-HASSIO-KEY"] = os.getenv("HASSIO_TOKEN"), + ["X-Supervisor-Token"] = os.getenv("SUPERVISOR_TOKEN"), }, keepalive_timeout = 60, keepalive_pool = 10 diff --git a/mopidy/rootfs/etc/nginx/lua/ha-auth.lua b/mopidy/rootfs/etc/nginx/lua/ha-auth.lua index b3542a2..d9a254c 100644 --- a/mopidy/rootfs/etc/nginx/lua/ha-auth.lua +++ b/mopidy/rootfs/etc/nginx/lua/ha-auth.lua @@ -36,7 +36,7 @@ function authenticate() body = ngx.encode_args({["username"]=username, ["password"]=password}), headers = { ["Content-Type"] = "application/x-www-form-urlencoded", - ["X-HASSIO-KEY"] = os.getenv("HASSIO_TOKEN"), + ["X-Supervisor-Token"] = os.getenv("SUPERVISOR_TOKEN"), }, keepalive_timeout = 60, keepalive_pool = 10 @@ -80,4 +80,4 @@ if not os.getenv('DISABLE_HA_AUTHENTICATION') then ngx.say('401 Access Denied') ngx.exit(ngx.HTTP_UNAUTHORIZED) end -end \ No newline at end of file +end diff --git a/mopidy/rootfs/etc/nginx/nginx.conf b/mopidy/rootfs/etc/nginx/nginx.conf index 5d5980a..c251be5 100644 --- a/mopidy/rootfs/etc/nginx/nginx.conf +++ b/mopidy/rootfs/etc/nginx/nginx.conf @@ -17,7 +17,7 @@ pcre_jit on; error_log /proc/1/fd/1 error; # Load allowed environment vars -env HASSIO_TOKEN; +env SUPERVISOR_TOKEN; env DISABLE_HA_AUTHENTICATION; # Load dynamic modules. @@ -31,11 +31,11 @@ events { http { include /etc/nginx/includes/mime.types; - log_format hassio '[$time_local] $status ' - '$http_x_forwarded_for($remote_addr) ' - '$request ($http_user_agent)'; + log_format homeassistant '[$time_local] $status ' + '$http_x_forwarded_for($remote_addr) ' + '$request ($http_user_agent)'; - access_log /proc/1/fd/1 hassio; + access_log /proc/1/fd/1 homeassistant; client_max_body_size 4G; default_type application/octet-stream; gzip on;