-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(qwik-city): add getOrigin option to QwikCityBunOptions and QwikC… #8251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: eb46df2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ityDenoOptions for improved URL handling
a66e5a5 to
91f4f25
Compare
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
wmertens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good but needs a little bit more
|
|
||
| function getRequestUrl(request: Request, opts: QwikCityBunOptions) { | ||
| const url = new URL(request.url); | ||
| const origin = opts.getOrigin?.(request) ?? opts.origin ?? Bun.env.ORIGIN ?? url.origin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ?? opts.origin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, remove the ?? url.origin from the end so that it becomes undefined if not provided.
Then, if it is undefined, just return the original url, otherwise create the new URL.
…Options and QwikCityDenoOptions, update URL handling logic
…ityDenoOptions for improved URL handling
What is it?
Description
fix #8250
feat(qwik-city): add getOrigin option to QwikCityBunOptions and QwikCityDenoOptions for improved URL handling
Checklist
pnpm change