Redirect ! page to normal version
This commit is contained in:
1 parent
2668dacef4
commit
cb4b449c72
2 files changed
+17
No files matched your search
@@ -0,0 +1,15 @@
|
||||
function redirectFragment() {
|
||||
return async (ctx, next) => {
|
||||
const query = ctx.query
|
||||
|
||||
console.log(query)
|
||||
|
||||
if ('_escaped_fragment_' in query) {
|
||||
ctx.redirect(ctx.path)
|
||||
} else {
|
||||
await next()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = redirectFragment
|
||||
Reference in new issue
Block a user