Skip to content

Commit

Permalink
index: Fix URL parameter parsing
Browse files Browse the repository at this point in the history
When using DashCast or any other external site that may use the embedded
URL, we want to make sure we are using the original location of the page
instead of looking at the referrer URL. The referrer URL will not have
the `url` or `entity` parameters.

Fixes: #88
  • Loading branch information
bekriebel committed Jun 11, 2021
1 parent 358d4c2 commit 54a39b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/webrtc/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</head>
<body>
<script>
const url = document.referrer ? new URL(document.referrer) : window.location;
const url = window.location;

const hass = {}
hass.callWS = () => '';
Expand Down

0 comments on commit 54a39b9

Please sign in to comment.