mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
🔨 Updates for upstream Supervisor changes
This commit is contained in:
parent
2d6d5be963
commit
3c50dd9548
5 changed files with 12 additions and 12 deletions
|
@ -5,7 +5,7 @@
|
|||
# ==============================================================================
|
||||
declare port
|
||||
declare certfile
|
||||
declare hassio_dns
|
||||
declare dns_host
|
||||
declare ingress_interface
|
||||
declare ingress_port
|
||||
declare keyfile
|
||||
|
@ -32,5 +32,5 @@ ingress_interface=$(bashio::addon.ip_address)
|
|||
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
|
||||
hassio_dns=$(bashio::dns.host)
|
||||
sed -i "s/%%hassio_dns%%/${hassio_dns}/g" /etc/nginx/includes/resolver.conf
|
||||
dns_host=$(bashio::dns.host)
|
||||
sed -i "s/%%dns_host%%/${dns_host}/g" /etc/nginx/includes/resolver.conf
|
||||
|
|
|
@ -1 +1 @@
|
|||
resolver %%hassio_dns%%;
|
||||
resolver %%dns_host%%;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,8 +20,8 @@ fi
|
|||
options+=(--auth none)
|
||||
|
||||
# Export env variables for the Home Assistant extension
|
||||
export HASS_SERVER="http://hassio/homeassistant"
|
||||
export HASS_TOKEN="${HASSIO_TOKEN:-}"
|
||||
export HASS_SERVER="http://supervisor/core"
|
||||
export HASS_TOKEN="${SUPERVISOR_TOKEN:-}"
|
||||
|
||||
# Run the code server
|
||||
exec code-server "${options[@]}" /config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue