try to make redirect work properly
This commit is contained in:
1 parent
421133ab85
commit
440ffdb745
2 files changed
+6
-9
No files matched your search
@@ -2,15 +2,8 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
head() {
|
middleware: (ctx) => {
|
||||||
return {
|
ctx.redirect('/blog')
|
||||||
meta: [
|
|
||||||
{
|
|
||||||
httpEquiv: 'refresh',
|
|
||||||
content: '0; url=/blog',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -19,6 +19,10 @@ const plugin: Plugin = ({ $axios, error }) => {
|
|||||||
return r
|
return r
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
|
if (process.static) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
error({
|
error({
|
||||||
statusCode: err.response.status,
|
statusCode: err.response.status,
|
||||||
message: err.toJSON(),
|
message: err.toJSON(),
|
||||||
|
|||||||
Reference in new issue
Block a user