mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 21:19:16 -04:00
Switch to new S6 service configuration (#40)
* Add new service files * Remove moved file * Move files * Add exec perm * Update for new services * Remove xz-utils after use * Check labels * Move labels to build * Typo * List images * Fixit * Add super lint * Update labels * Whoops * Remove superlint * Add teslamate dependency * Fix url
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name _;
|
||||
listen 8099 default_server;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:4000/;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Referer $http_referer;
|
||||
|
||||
# Disable encoding to allow the sub_filter to work
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
# Enable sub-filtering
|
||||
sub_filter_types text/css text/xml application/javascript text/javascript;
|
||||
sub_filter_once off;
|
||||
|
||||
# Home URLs in the HTML
|
||||
sub_filter 'href="/"' 'href="$http_x_ingress_path/"';
|
||||
|
||||
# Fonts in the CSS
|
||||
sub_filter 'url(/' 'url($http_x_ingress_path/';
|
||||
|
||||
# Update fixed paths in the .js files
|
||||
sub_filter '"/live"' '"$http_x_ingress_path/live"';
|
||||
sub_filter '"/js/"' '"$http_x_ingress_path/js/"';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user