Skip to content

[Routing] Fix subdomain routing with host parameter defaults #60976

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

Open
wants to merge 5 commits into
base: 6.4
Choose a base branch
from

Conversation

OskarStark
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #60963
License MIT

When a route has host parameters with defaults (e.g., {subdomain}.example.com with defaults ['subdomain' => 'en']), it should match requests where the host doesn't provide those parameters (e.g., example.com should match with subdomain='en').

When a route has host parameters with defaults (e.g., {subdomain}.example.com
with defaults ['subdomain' => 'en']), it should match requests where the host
doesn't provide those parameters (e.g., example.com should match with subdomain='en').

🤖 Generated with [Claude Code](https://claude.ai/code)
@carsonbot carsonbot changed the title Fix subdomain routing with host parameter defaults [Routing] Fix subdomain routing with host parameter defaults Jun 30, 2025
@carsonbot carsonbot added this to the 6.4 milestone Jun 30, 2025
@tcoch
Copy link
Contributor

tcoch commented Jun 30, 2025

Thanks for your work.
For now, tests are failing. I see that TraceableUrlMatcher decorator (and other) don't actually use the logic of the basic UrlMatcher, that's why some tests are failling apparently.
Based on your work (I did not know where to start when I submitted the bug I admit), I'll try some tweaks locally and I'll get back to you.

@tcoch
Copy link
Contributor

tcoch commented Jul 1, 2025

Thanks for your work, again. Seems OK for me now.

So, this works: when setting values for defaults, they are used.
But FYI, it feels like there's still some work to do around routing / requirements / default values (will be another PR), cause default value seems to be used if requirement is not met. I'll look around, create eventually a reproducer, if this hypothesis turns out to be true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants