Skip to content

Commit b2f8f5b

Browse files
fix: use rawUrl for path (#954)
fix: wip path encoding chore: log event chore: use rawurl chore: use rawurl Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 74be078 commit b2f8f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/getHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const makeHandler =
5656
return async (event, context) => {
5757
let requestMode = mode
5858
// Ensure that paths are encoded - but don't double-encode them
59-
event.path = new URL(event.path, event.rawUrl).pathname
59+
event.path = new URL(event.rawUrl).pathname
6060
// Next expects to be able to parse the query from the URL
6161
const query = new URLSearchParams(event.queryStringParameters).toString()
6262
event.path = query ? `${event.path}?${query}` : event.path

0 commit comments

Comments
 (0)