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`
贡献指南
评估
这个 Issue 还没有评估数据。