Skip to content

Commit

Permalink
fix(footer): fetch links from all domains
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickholzenkamp committed Apr 21, 2022
1 parent 12fbb96 commit e2e120e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/components/src/components/bal-footer/bal-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ export class Footer implements BalConfigObserver {

updateFooterLinks() {
if (!this.hideLinks) {
const allowedHosts = ['baloise.ch', 'baloise.dev'] // Allowed origins to fetch footer links
if (allowedHosts.some(allowedHost => location.hostname.endsWith(allowedHost))) {
loadFooterLinks(new Language(this.language)).then(links => (this.links = links))
} else {
console.warn('Footer links can not be fetched from this origin.', location.hostname)
}
loadFooterLinks(new Language(this.language)).then(links => (this.links = links))
}
}

Expand Down

0 comments on commit e2e120e

Please sign in to comment.