Mandatory base URL support in config
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to set a flag in Config that forces the resulting Client to *only* use URIs relative to the specified base URI, and never support absolute URIs.
This would add security when providing authentication: the config could `add_header` a header containing authentication information, and also set a mandatory base URI to ensure that the Client can't accidentally pass that authentication information to any other domain.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Config creates and configures Client, then find where URI resolution permits absolute URIs. Define the behavior for a mandatory base URI and verify that relative requests still work while absolute requests are rejected, preventing configured authentication headers from being sent to another domain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100