Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Forward code query param
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Apr 18, 2023
1 parent c919608 commit ccaa23c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redirect/functions/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ exports.handler = async function (event, _context) {
validate(scheme, url.host, url.pathname)
}

url.searchParams.set('code', code)
url.searchParams.forEach((_, key) => {
if (!validQueryParams.has(key)) url.searchParams.delete(key)
})
url.searchParams.set('code', code)

return getResponse(url.toString())
}
Expand Down

0 comments on commit ccaa23c

Please sign in to comment.