Fix API paths for Home Assistant Ingress compatibility

- Change absolute API paths to relative paths in camera-search.js
- Change absolute API paths to relative paths in stream-discovery.js
- Fixes resource loading in HA Ingress environment
- Maintains compatibility with direct Docker installations
- Version bump to 1.0.2
This commit is contained in:
eduard256
2025-11-18 13:35:29 +03:00
parent 1bab993a13
commit 90063c3f3a
6 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ import (
const (
// Version is the application version
Version = "1.0.0"
Version = "1.0.2"
// Banner is the application banner
Banner = `
+1 -1
View File
@@ -9,6 +9,7 @@ require (
github.com/go-chi/chi/v5 v5.2.3
github.com/go-playground/validator/v10 v10.28.0
github.com/lithammer/fuzzysearch v1.1.8
gopkg.in/yaml.v3 v3.0.1
)
require (
@@ -23,5 +24,4 @@ require (
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.29.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+1
View File
@@ -67,6 +67,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "webui",
"version": "1.0.0",
"version": "1.0.2",
"type": "module",
"description": "",
"main": "index.js",
+1 -1
View File
@@ -9,7 +9,7 @@ export class CameraSearchAPI {
}
async search(query, limit = 10) {
const response = await fetch(`${this.baseURL}/api/v1/cameras/search`, {
const response = await fetch(`${this.baseURL}api/v1/cameras/search`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
+1 -1
View File
@@ -12,7 +12,7 @@ export class StreamDiscoveryAPI {
discover(request, callbacks) {
this.close();
const url = new URL(`${this.baseURL}/api/v1/streams/discover`, window.location.origin);
const url = new URL(`${this.baseURL}api/v1/streams/discover`, window.location.origin);
fetch(url, {
method: 'POST',