Skip to content

Conversation

@JerryWu1234
Copy link
Contributor

…ityDenoOptions for improved URL handling

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

fix #8250
feat(qwik-city): add getOrigin option to QwikCityBunOptions and QwikCityDenoOptions for improved URL handling

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@JerryWu1234 JerryWu1234 requested a review from a team as a code owner January 19, 2026 06:54
@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: eb46df2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@builder.io/qwik-city Patch
eslint-plugin-qwik Patch
@builder.io/qwik Patch
create-qwik Patch
@builder.io/qwik-react Patch

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@8251
npm i https://pkg.pr.new/@builder.io/qwik-city@8251
npm i https://pkg.pr.new/eslint-plugin-qwik@8251
npm i https://pkg.pr.new/create-qwik@8251

commit: eb46df2

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview eb46df2

Copy link
Member

@wmertens wmertens left a 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;
Copy link
Member

Choose a reason for hiding this comment

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

remove ?? opts.origin

Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐞] 'origin' does not exist in type 'QwikCityBunOptions'

2 participants