refactor(app): Standardize subdomain detection logic#9751
Merged
lonnieezell merged 8 commits intocodeigniter4:4.7from Oct 10, 2025
Merged
refactor(app): Standardize subdomain detection logic#9751lonnieezell merged 8 commits intocodeigniter4:4.7from
lonnieezell merged 8 commits intocodeigniter4:4.7from
Conversation
datamweb
reviewed
Oct 8, 2025
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
datamweb
reviewed
Oct 8, 2025
Contributor
|
I wouldn't add the participants' local domains to the config. Sorry, if everyone adds their own region, it will be unnecessary. Try generating the docs, I think there's an error: I don't quite understand what the function limits? |
michalsn
reviewed
Oct 9, 2025
michalsn
reviewed
Oct 9, 2025
michalsn
reviewed
Oct 9, 2025
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
michalsn
approved these changes
Oct 10, 2025
Member
michalsn
left a comment
There was a problem hiding this comment.
Looks great! That's a really nice improvement.
Member
Author
|
Thanks for the reviews! |
lonnieezell
added a commit
to lonnieezell/CodeIgniter4
that referenced
this pull request
Oct 10, 2025
* refactor(app): Standardize subdomain detection logic * Update app/Config/Hostnames.php Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com> * Update tests/system/Helpers/URLHelper/MiscUrlTest.php Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com> * addressing review comments * cs fix * cs fix * cs fix * remove typo in docs ci-skip --------- Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As discussed here, this pulls out the subdomain detection logic from the restrict controller attribute into a helper method in the url_helper. It pulls the TLDs list into a new config file so users can easily customize this list. Replaced the current RouteCollection subdomain detection with this new feature as it's more complete.
Checklist: