Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Support relative urls in getSrc() (#2444)

Dominique K3984e02bca60
diff --git a/ui/component/or-components/src/or-iframe.ts b/ui/component/or-components/src/or-iframe.ts
index b09cc582e..c4c51d8b5 100644
--- a/ui/component/or-components/src/or-iframe.ts
+++ b/ui/component/or-components/src/or-iframe.ts
@@ -198,7 +198,7 @@ export class OrIframe extends LitElement {
public getSrc(): string {
if (this.preventCache && this.src) {
- const url = new URL(this.src);
+ const url = new URL(this.src, globalThis.location.href);
url.searchParams.set("t", Date.now().toString());
return url.toString();
}