diff --git a/client/lib/utils.js b/client/lib/utils.js index e77e3ad..7d3df6f 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -77,10 +77,5 @@ export const customDomainUsed = function() { const appDomain = getDomain(config.public.appUrl) const host = getHost() - console.debug('customDomainUsed', { - 'appDomain': appDomain, - 'host': host, - 'customDomain': host !== appDomain && getDomain(host) !== appDomain - }) return host !== appDomain && getDomain(host) !== appDomain } diff --git a/client/pages/forms/[slug]/index.vue b/client/pages/forms/[slug]/index.vue index fd61539..5e6046e 100644 --- a/client/pages/forms/[slug]/index.vue +++ b/client/pages/forms/[slug]/index.vue @@ -21,7 +21,7 @@

- Unfortunately we could not find this form. It may have been deleted by it's author. + Unfortunately we could not find this form. It may have been deleted.

@@ -115,25 +115,25 @@ await loadForm(slug) useOpnSeoMeta({ title: () => { - if (form && form.value.is_pro && form.value.seo_meta.page_title) { + if (form && form.value?.is_pro && form.value.seo_meta.page_title) { return form.value.seo_meta.page_title } return form.value ? form.value.title : 'Create beautiful forms' }, - description () { - if (form && form.value.is_pro && form.value.seo_meta.page_description) { + description: () => { + if (form && form.value?.is_pro && form.value.seo_meta.page_description) { return form.value.seo_meta.page_description } - return (form && form.value.description) ? form.value.description.substring(0, 160) : null + return (form && form.value?.description) ? form.value?.description.substring(0, 160) : null }, - ogImage () { - if (form && form.value.is_pro && form.value.seo_meta.page_thumbnail) { + ogImage: () => { + if (form && form.value?.is_pro && form.value.seo_meta.page_thumbnail) { return form.value.seo_meta.page_thumbnail } - return (form && form.value.cover_picture) ? form.value.cover_picture : null + return (form && form.value?.cover_picture) ? form.value?.cover_picture : null }, robots: () => { - return (form && form.value.can_be_indexed) ? null : 'noindex, nofollow' + return (form && form.value?.can_be_indexed) ? null : 'noindex, nofollow' } }) useHead({ diff --git a/client/server/plugins/embeddable.js b/client/server/plugins/embeddable.js index a68639a..cdfe1f0 100644 --- a/client/server/plugins/embeddable.js +++ b/client/server/plugins/embeddable.js @@ -3,7 +3,6 @@ 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' }