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:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user