Permalink
Browse files

fix: fullPathRedirect with query support (#149)

  • Loading branch information...
heww authored and pi0 committed Apr 20, 2018
1 parent f7576e3 commit a37d5995f21856420b04c1b64a57638ce07b297c
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/core/auth.js
  2. +1 −1 lib/core/utilities.js
@@ -304,7 +304,7 @@ export default class Auth {
return
}
const from = this.options.fullPathRedirect ? this.ctx.route.path : this.ctx.route.fullPath
const from = this.options.fullPathRedirect ? this.ctx.route.fullPath : this.ctx.route.path
let to = this.options.redirect[name]
if (!to) {
@@ -4,7 +4,7 @@ export const isSet = o => !isUnset(o)
export const isSameURL = (a, b) => a.split('?')[0] === b.split('?')[0]
export const isRelativeURL = u =>
u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]{1,200}$/.test(u)
u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[\?]?([^\#]*)#?([^\#]*)$/.test(u)
export const parseQuery = queryString => {
const query = {}

0 comments on commit a37d599

Please sign in to comment.