Skip to content

Commit

Permalink
fix: pagedir not using absolute url (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Jul 17, 2023
1 parent c4c2db2 commit a11a7f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-mayflies-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"uploadthing": patch
---

fix: make sure url is absolute in pagedir
2 changes: 1 addition & 1 deletion packages/uploadthing/src/internal/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const buildRequestHandler = <
config?.uploadthingSecret ?? process.env.UPLOADTHING_SECRET;

// Get inputs from query and params
const params = new URL(req.url ?? "").searchParams;
const params = new URL(req.url ?? "", getUploadthingUrl()).searchParams;
const uploadthingHook = req.headers?.get("uploadthing-hook") ?? undefined;
const slug = params.get("slug") ?? undefined;
const actionType = params.get("actionType") ?? undefined;
Expand Down

1 comment on commit a11a7f0

@vercel
Copy link

@vercel vercel bot commented on a11a7f0 Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.