Skip to content

Commit

Permalink
fix: camera cachebust no longer breaks certain urls.
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Bassett <[email protected]>
  • Loading branch information
cadriel committed Feb 18, 2021
1 parent 073196c commit 96cc695
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/cards/dashboard/CameraCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export default class CameraCard extends Mixins(UtilsMixin) {
refresh = new Date().getTime()
get url () {
const url = this.$store.state.config.uiSettings.camera.url
const params = new URLSearchParams(url)
params.set('cacheBust', '' + this.refresh)
return decodeURIComponent(params.toString())
const hostUrl = new URL(document.URL)
const url = new URL(this.$store.state.config.uiSettings.camera.url, hostUrl.origin)
url.searchParams.append('cacheBust', this.refresh.toString())
return url.toString()
}
get config () {
Expand Down

0 comments on commit 96cc695

Please sign in to comment.