mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 13:10:30 -04:00
* 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
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
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/"';
|
|
}
|
|
}
|