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
@@ -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',