Created
March 13, 2021 19:27
-
-
Save ynechaev/f129d0dd1a25d7a09ffe65500023c6e9 to your computer and use it in GitHub Desktop.
Subdomain index vue test page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h1>subdomain host: {{ this.host }}</h1> | |
</div> | |
</template> | |
<script> | |
export default { | |
async asyncData({ req }) { | |
if (process.server) { | |
const host = req.headers.host | |
return { host } | |
} | |
}, | |
data() { | |
return { | |
host: null | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment