Skip to content

Commit

Permalink
Re-URL-encode token
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarprause committed Apr 16, 2023
1 parent eb1311a commit 8d59555
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const handle: Handler = async (request) => {
try {
const response = await fetch(
eventsUrl,
token ? { headers: { Cookie: `_t=${token}` } } : undefined
token
? { headers: { Cookie: `_t=${encodeURIComponent(token)}` } }
: undefined
);
if (!response.ok) {
console.error("Response status", response.status);
Expand Down

0 comments on commit 8d59555

Please sign in to comment.