Redirect ! page to normal version

This commit is contained in:
tmshv committed 2017-06-03 20:16:26 +03:00
1 parent 2668dacef4
commit cb4b449c72
2 files changed
+17

No files matched your search

+15
View File
@@ -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