Skip to content

Commit

Permalink
Fix Ingress URL Prefix (#301)
Browse files Browse the repository at this point in the history
Co-authored-by: root <[email protected]>
Co-authored-by: Franck Nijhof <[email protected]>
  • Loading branch information
3 people authored Feb 9, 2024
1 parent 358481e commit 8e37683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
16 changes: 1 addition & 15 deletions sqlite-web/rootfs/etc/nginx/templates/ingress.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}/;
}
}
1 change: 1 addition & 0 deletions sqlite-web/rootfs/etc/s6-overlay/s6-rc.d/sqlite-web/run
Original file line number Diff line number Diff line change
Expand Up @@ -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...'

Expand Down

0 comments on commit 8e37683

Please sign in to comment.