Fix Ingress URL Prefix (#301)

Co-authored-by: root <root@a0d7b954-ssh.local.hass.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Joel Pearson 2024-02-09 20:24:21 +11:00 committed by GitHub
parent 358481e33b
commit 8e3768388f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 15 deletions

View file

@ -8,20 +8,6 @@ server {
allow 172.30.32.2;
deny all;
proxy_pass http://sqlite;
sub_filter_once off;
sub_filter 'href="/' 'href="{{ .entry }}/';
sub_filter '/static/' '{{ .entry }}/static/';
sub_filter '/event_data/' '{{ .entry }}/event_data/';
sub_filter '/events/' '{{ .entry }}/events/';
sub_filter '/recorder_runs/' '{{ .entry }}/recorder_runs/';
sub_filter '/schema_changes/' '{{ .entry }}/schema_changes/';
sub_filter '/state_attributes/' '{{ .entry }}/state_attributes/';
sub_filter '/states/' '{{ .entry }}/states/';
sub_filter '/statistics/' '{{ .entry }}/statistics/';
sub_filter '/statistics_meta/' '{{ .entry }}/statistics_meta/';
sub_filter '/statistics_runs/' '{{ .entry }}/statistics_runs/';
sub_filter '/statistics_short_term/' '{{ .entry }}/statistics_short_term/';
proxy_pass http://sqlite/{{ .entry }}/;
}
}

View file

@ -15,6 +15,7 @@ fi
options+=(--host 127.0.0.1)
options+=(--no-browser)
options+=(-x "${database}")
options+=(--url-prefix "$(bashio::addon.ingress_entry)")
bashio::log.info 'Starting SQLite Web...'