Skip to content

Commit

Permalink
Only use basename of url as origin
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Nov 10, 2022
1 parent 07b87aa commit f7a325c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/web-app-draw-io/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default defineComponent({
} = this.applicationConfig
return { url, theme, autosave: autosave ? 1 : 0 }
},
urlHost() {
const url = new URL(this.config.url)
return `${url.protocol}//${url.hostname}`
},
iframeSource() {
const query = qs.stringify({
embed: 1,
Expand Down Expand Up @@ -118,7 +122,7 @@ export default defineComponent({
message: error,
modified: false
}),
this.config.url
this.urlHost
)
},
async checkPermissions() {
Expand All @@ -145,7 +149,7 @@ export default defineComponent({
xml: response.body,
autosave: this.config.autosave
}),
this.config.url
this.urlHost
)
} catch (error) {
this.errorPopup(error)
Expand Down Expand Up @@ -186,7 +190,7 @@ export default defineComponent({
xml: reader.result,
autosave: this.config.autosave
}),
this.config.url
this.urlHost
)
}
reader.readAsDataURL(blob)
Expand All @@ -211,7 +215,7 @@ export default defineComponent({
message: message,
modified: false
}),
this.config.url
this.urlHost
)
} else {
this.successPopup(message)
Expand Down

0 comments on commit f7a325c

Please sign in to comment.