Skip to content

Commit f53b8f2

Browse files
committed
Update index.js
- Fix isIgnoredPath
1 parent 2543b8c commit f53b8f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
const Hashids = require('hashids/cjs');
44
const NODE_ENV = process.env.NODE_ENV;
55
const isProduction = (NODE_ENV === 'production');
6-
const IGNORE_AUTH_PATH_REGEX = process.env.IGNORE_AUTH_PATH_REGEX || /(web)/;
6+
const IGNORE_AUTH_PATH_REGEX = process.env.IGNORE_AUTH_PATH_REGEX || '';
77

88
function isIgnoredPath(path) {
9-
return path.search(IGNORE_AUTH_PATH_REGEX) >= 0;
9+
return IGNORE_AUTH_PATH_REGEX !== '' && path.search(IGNORE_AUTH_PATH_REGEX) >= 0;
1010
}
1111

1212
function genHashId(idHashids, id = 141236) {

0 commit comments

Comments
 (0)