fix canonical url

This commit is contained in:
polv committed 2020-12-17 18:51:26 +07:00
1 parent fb69b2710f
commit 50e8530e96
5 files changed
+69 -11

No files matched your search

+4 -3
View File
@@ -1,9 +1,10 @@
import { Plugin } from '@nuxt/types'
const plugin: Plugin = ({ $axios, error }) => {
if (typeof location !== 'undefined') {
$axios.defaults.baseURL = location.origin
}
$axios.defaults.baseURL =
typeof location !== 'undefined'
? location.origin
: `http://localhost:${process.env.SERVER_PORT}`
$axios.interceptors.response.use(
(r) => {