Skip to content

Commit 0181d33

Browse files
committed
fix(getRequestPath): avoid double normalization
1 parent 6c87d87 commit 0181d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function getRequestProtocol(
130130
const DOUBLE_SLASH_RE = /[/\\]{2,}/g;
131131

132132
export function getRequestPath(event: H3Event): string {
133-
const path = event._originalPath.replace(DOUBLE_SLASH_RE, "/");
133+
const path = event._originalPath;
134134
if (path.includes("?")) {
135135
const [basePath, query] = path.split("?");
136136
return basePath.replace(DOUBLE_SLASH_RE, "/") + "?" + query;

0 commit comments

Comments
 (0)