Skip to content

Commit

Permalink
core: frontend: add support for 'avoid_iframes' field in register_ser…
Browse files Browse the repository at this point in the history
…vice
  • Loading branch information
Williangalvani committed Jan 30, 2024
1 parent f15264f commit e9ecbd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,10 @@ export default Vue.extend({
}
},
createExtensionAddress(service: Service): string {
if (service.metadata?.avoid_iframes) {
const base_url = window.location.origin.split(":").slice(0, 2).join(":")
return `${base_url}:${service.port}`
}
let address = `/extension/${service?.metadata?.sanitized_name}`
if (service?.metadata?.new_page) {
address += '?full_page=true'
Expand Down
1 change: 1 addition & 0 deletions core/frontend/src/types/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface ServiceMetadata {
new_page?: boolean
sanitized_name?: string
extra_query?: string
avoid_iframes?: boolean
}

export interface Service {
Expand Down

0 comments on commit e9ecbd6

Please sign in to comment.