diff --git a/client/components/tools/StopImpersonation.vue b/client/components/tools/StopImpersonation.vue index 81e8517..b5aaf63 100644 --- a/client/components/tools/StopImpersonation.vue +++ b/client/components/tools/StopImpersonation.vue @@ -16,7 +16,7 @@ @@ -24,18 +24,18 @@ diff --git a/client/server/plugins/embeddable.js b/client/server/plugins/embeddable.js index cdfe1f0..a68639a 100644 --- a/client/server/plugins/embeddable.js +++ b/client/server/plugins/embeddable.js @@ -3,6 +3,7 @@ export default defineNitroPlugin(nitroApp => { const routePath = event.node?.req?.url || event.node?.req?.originalUrl // const routePath= event.context.params._ if (routePath && !routePath.startsWith('/forms/')) { + console.error('Not a form, setting X-Frame-Options', routePath) // Only allow embedding of forms response.headers['X-Frame-Options'] = 'sameorigin' } diff --git a/client/stores/auth.js b/client/stores/auth.js index b84ad56..74a90e1 100644 --- a/client/stores/auth.js +++ b/client/stores/auth.js @@ -19,9 +19,8 @@ export const useAuthStore = defineStore('auth', { }, // Stop admin impersonation stopImpersonating() { - this.token = this.admin_token + this.setToken(this.admin_token) this.admin_token = null - // TODO: re-fetch user }, setToken(token) {