codeigniter4 / codeigniter4/CodeIgniter4
Bug: Inconsistent hostname/subdomain limitation in Routing
- 主要語言
- PHP
- 星號
- 6k
- 分支
- 2k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 73
描述
CodeIgniter version: 4.3.1
(1) `hostname` takes precedence over `subdomain`
if a route has both:
```php
$routes->get('/', 'Home::index');
$routes->get('/', 'Media::index', ['hostname' => 'media.example.com:8888', 'subdomain' => '*']);
```
`http://media.example.com:8888/ci431/public/` → `App\Controllers\Media::index`
`http://user.example.com:8888/ci431/public/` → `App\Controllers\Home::index`
(2) `subdomain` takes precedence over `hostname`
if two routes matches:
```php
$routes->get('/', 'Home::index');
$routes->get('/', 'Media::index', ['hostname' => 'media.example.com:8888']);
$routes->get('/', 'All::index', ['subdomain' => '*']);
```
`http://media.example.com:8888/ci431/public/` → `App\Controllers\All::index`
`http://user.example.com:8888/ci431/public/` → `App\Controllers\All::index`
貢獻指南
研究方向
Start in the Routing hostname and subdomain matching entry points; the issue provides reproduction routes and requests for media.example.com:8888 and user.example.com:8888. Reproduce both cases with CodeIgniter 4.3.1, then inspect the matching precedence. Done means hostname and subdomain constraints produce consistent, documented route selection in both examples.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- php
- 領域
- backend
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100