Skip to content

Commit

Permalink
πŸ› force redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustella committed Oct 11, 2023
1 parent f2b6627 commit a8cd1a4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ import './styles/theme.css'
onBeforeMount(async () => {
// this is essential to make request sent at client side
// should be a bug of nuxt
await nextTick()
const { host, protocol } = location
if (host === 'nuistshare.cn')
location.href = 'https://www.nuistshare.cn'
if (protocol === 'http:' && host !== 'localhost')
location.href = `https://${host}`
const login = useLogin()
const user = useUser()
const token = localStorage.getItem('token')
Expand Down

0 comments on commit a8cd1a4

Please sign in to comment.