Fix custom domain
This commit is contained in:
parent
695153eac9
commit
bd5fa87997
|
@ -23,7 +23,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
||||||
const config = useRuntimeConfig()
|
const config = useRuntimeConfig()
|
||||||
|
|
||||||
const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName]
|
const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName]
|
||||||
if (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost())) {
|
if (process.server && (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost()))) {
|
||||||
return redirectToMainDomain( {
|
return redirectToMainDomain( {
|
||||||
reason: 'header_mismatch',
|
reason: 'header_mismatch',
|
||||||
customDomainHeaderValue: customDomainHeaderValue,
|
customDomainHeaderValue: customDomainHeaderValue,
|
||||||
|
|
Loading…
Reference in New Issue