|
|
@ -58,9 +58,7 @@ let isPathExcluded = function (opts, path, method) { |
|
|
|
if (!excludeAll) { |
|
|
|
let excludeOpts = opts.exclude || []; |
|
|
|
excludeOpts.push({ p: '/login', o: 'POST' }); |
|
|
|
excludeOpts.push({ p: '/wxLogin', o: 'POST' }); |
|
|
|
excludeOpts.push({ p: '/logout', o: 'PUT' }); |
|
|
|
excludeOpts.push({ p: '/wxLogout', o: 'PUT' }); |
|
|
|
excludes = new ExcludesUrls(excludeOpts); |
|
|
|
} |
|
|
|
let excluded = excludeAll || excludes.isExcluded(path, method); |
|
|
@ -100,7 +98,6 @@ let isResourceAvailable = function (resources, options) { |
|
|
|
let authCode = null; |
|
|
|
// authorize user by authorization attribute
|
|
|
|
const { authAttr, method, path } = options; |
|
|
|
console.log(resources, options) |
|
|
|
for (let prop in authAttr) { |
|
|
|
let keys = []; |
|
|
|
let re = pathToRegexp(prop.replace(/\:[A-Za-z_\-]+\b/g, '(\\d+)'), keys); |
|
|
|