Debugging custom domain
This commit is contained in:
4
client/middleware/custom-domain.global.js
vendored
4
client/middleware/custom-domain.global.js
vendored
@@ -26,6 +26,10 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
||||
const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName]
|
||||
if (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost())) {
|
||||
// If custom domain header doesn't match, redirect
|
||||
console.info('Custom domain header does not match, redirecting',{
|
||||
'customDomainHeaderValue': customDomainHeaderValue,
|
||||
'host': getDomain(getHost()),
|
||||
})
|
||||
return redirectToMainDomain()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user