Skip to content

Commit 6655cd8

Browse files
committed
fix(nginx): refactor user ID mapping to improve variable handling
1 parent d45cfca commit 6655cd8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# extract $userIdPrefix from first 3 characters of `$authUserId`
2-
map $authUserId $userIdPrefix {
2+
map $authUserId $userIdPrefixTmp {
33
default 0;
44
# Micro optimization: if `$authUserId` is zero, don't bother with regex.
55
0 0;
66
"~^(.{3})" $1;
77
}
8+
9+
map $userIdPrefixTmp $userIdPrefix {
10+
~^(.*)$ $1;
11+
}

0 commit comments

Comments
 (0)