|
|
@ -2,9 +2,7 @@ export default defineNuxtRouteMiddleware(async (to) => { |
|
|
|
// avoid non-embeddable paths within an iframe
|
|
|
|
// avoid non-embeddable paths within an iframe
|
|
|
|
if (self !== top) { |
|
|
|
if (self !== top) { |
|
|
|
// allow for shared base
|
|
|
|
// allow for shared base
|
|
|
|
const embeddablePaths = ['/base/'] |
|
|
|
if (to.path.startsWith('/base/')) { |
|
|
|
const embedRegex = new RegExp(`^(${embeddablePaths.join('|')})`) |
|
|
|
|
|
|
|
if (embedRegex.test(to.path)) { |
|
|
|
|
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|