Skip to content

Commit

Permalink
fix to proxy querystring
Browse files Browse the repository at this point in the history
  • Loading branch information
markusahlstrand committed Aug 31, 2024
1 parent 7696f09 commit f1d020c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/serious-falcons-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@authhero/auth0-proxy": patch
---

Fix to proxy the querystring
4 changes: 3 additions & 1 deletion apps/auth0-proxy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ app.all("*", async (c) => {
API_KEY2: string;
}>(c);

const sourceUrl = new URL(c.req.url);
const targetUrl = new URL(AUTH0_DOMAIN);
targetUrl.pathname = c.req.path;
targetUrl.pathname = sourceUrl.pathname;
targetUrl.search = sourceUrl.search;

const headers = new Headers();
for (const [key, value] of c.req.raw.headers.entries()) {
Expand Down

0 comments on commit f1d020c

Please sign in to comment.