mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-18 20:10:31 +02:00
fix(birdnet-pipy): simplify ingress to single <base href> rewrite
Upstream 0.6.3 consolidates deployment-path handling into a single
<base href> declaration in index.html with Vite base: './' and
relative paths for all internal URLs. The previous seven sub_filter
rules (href/src/'/api'/'/socket.io') are no longer needed — one
<base href> replacement is sufficient.
Also removes the incidental brittleness from byte-level sub_filter
matches in minified JS bundles (the '/stream/' rule inadvertently
double-prefixed the literal 'api.get("/stream/config")' string).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## 0.6.3 (2026-04-13)
|
||||||
|
- Simplify ingress nginx to a single `<base href>` rewrite. Upstream now declares `<base href="/">` in `index.html` with Vite `base: './'` and uses relative paths for all internal URLs (built assets, axios `baseURL`, socket.io `path`). The previous seven `sub_filter` rules (href/src/`/api`/`/socket.io`) are no longer needed — one `<base href>` replacement is sufficient.
|
||||||
|
- Removes incidental brittleness from byte-level `sub_filter` matches in minified JS bundles (the old `/stream/` rule had inadvertently double-prefixed the literal `api.get("/stream/config")` string).
|
||||||
|
- Update to latest version from Suncuss/BirdNET-PiPy (changelog : https://github.com/Suncuss/BirdNET-PiPy/releases)
|
||||||
|
|
||||||
## 0.6.2-2 (11-04-2026)
|
## 0.6.2-2 (11-04-2026)
|
||||||
- Minor bugs fixed
|
- Minor bugs fixed
|
||||||
|
|
||||||
|
|||||||
@@ -97,4 +97,4 @@ schema:
|
|||||||
ssl: bool?
|
ssl: bool?
|
||||||
slug: birdnet-pipy
|
slug: birdnet-pipy
|
||||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pipy
|
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pipy
|
||||||
version: "0.6.2-2"
|
version: "0.6.3"
|
||||||
|
|||||||
@@ -1,26 +1,12 @@
|
|||||||
absolute_redirect off;
|
absolute_redirect off;
|
||||||
rewrite ^%%ingress_entry%%/(.*)$ /$1 break;
|
rewrite ^%%ingress_entry%%/(.*)$ /$1 break;
|
||||||
sub_filter_once off;
|
sub_filter_once on;
|
||||||
sub_filter_types *;
|
sub_filter_types text/html;
|
||||||
|
|
||||||
# Inject <base href> for Vue Router history mode and static asset loading
|
# Rewrite the frontend's default <base href="/" /> to the ingress prefix so
|
||||||
sub_filter '<head>' '<head><base href="%%ingress_entry%%/">';
|
# all relative URLs (assets, axios baseURL, socket.io path) resolve under
|
||||||
|
# ingress. The frontend declares BASE once via this tag; no other rewrites
|
||||||
# Rewrite absolute href/src attributes in HTML
|
# are needed. Pattern deliberately omits the closing bracket so it matches
|
||||||
sub_filter 'href="/' 'href="%%ingress_entry%%/';
|
# both self-closing (<base href="/" />) and non-self-closing (<base href="/">)
|
||||||
sub_filter 'src="/' 'src="%%ingress_entry%%/';
|
# forms. sub_filter_once above ensures only the first occurrence is touched.
|
||||||
|
sub_filter '<base href="/"' '<base href="%%ingress_entry%%/"';
|
||||||
# Rewrite API paths in JS bundles (axios baseURL and fetch calls)
|
|
||||||
# Pattern includes baseURL:"/api" (no trailing slash) so "/api" is needed
|
|
||||||
sub_filter '"/api' '"%%ingress_entry%%/api';
|
|
||||||
sub_filter "'/api" "'%%ingress_entry%%/api";
|
|
||||||
|
|
||||||
# Do NOT rewrite "/stream/" — LiveFeed.vue strips the leading slash from
|
|
||||||
# stream URLs returned by /api/stream/config so they resolve relative to
|
|
||||||
# <base href="%%ingress_entry%%/"> (injected above). Adding a sub_filter
|
|
||||||
# for '/stream/' would also rewrite the literal 'api.get("/stream/config")'
|
|
||||||
# inside the JS bundle, producing a double-prefixed request.
|
|
||||||
|
|
||||||
# Rewrite Socket.IO default path in the client library
|
|
||||||
sub_filter '"/socket.io' '"%%ingress_entry%%/socket.io';
|
|
||||||
sub_filter "'/socket.io" "'%%ingress_entry%%/socket.io";
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"last_update": "2026-04-11",
|
"last_update": "2026-04-13",
|
||||||
"repository": "alexbelgium/hassio-addons",
|
"repository": "alexbelgium/hassio-addons",
|
||||||
"slug": "birdnet-pipy",
|
"slug": "birdnet-pipy",
|
||||||
"source": "github",
|
"source": "github",
|
||||||
"upstream_repo": "Suncuss/BirdNET-PiPy",
|
"upstream_repo": "Suncuss/BirdNET-PiPy",
|
||||||
"upstream_version": "0.6.2"
|
"upstream_version": "0.6.3"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user