Skip to content

Commit ff09cae

Browse files
authored
fix: pass query string to handler (#719)
1 parent 39da13e commit ff09cae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/templates/getHandler.js

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ const makeHandler =
4949
bridge.listen()
5050

5151
return async (event, context) => {
52+
// Next expects to be able to parse the query from the URL
53+
const query = new URLSearchParams(event.queryStringParameters).toString()
54+
event.path = query ? `${event.path}?${query}` : event.path
55+
5256
const { headers, ...result } = await bridge.launcher(event, context)
5357
/** @type import("@netlify/functions").HandlerResponse */
5458

0 commit comments

Comments
 (0)