无法获取完整协议的URL
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 251
- PR merge metrics
- No merged PRs in 30d
Description
$request->url()和$request->fullUrl()均无法获取完整协议头的URL,建议新增方法完善,示例:
`
/**
* @return string
*/
public function protocol()
{
return $this->scheme() . '://';
}
/**
* @return string
*/
public function scheme()
{
return strtolower($this->header('x-forwarded-proto', 'http'));
}
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the request methods referenced in the issue, $request->url() and $request->fullUrl(), and compare them with the proposed protocol() and scheme() behavior. The work is done when a request can expose a complete URL including its protocol, including the forwarded-protocol case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100