Skip to content

feat: Referer Header add structured URI parsing and RFC-compliant validation #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ferrohd
Copy link

@ferrohd ferrohd commented Jun 10, 2025

Gave some love to the Referer header while respecting RFC7231 spec.

Usage

let referer = Referer::from_str("https://example.com:8443/api/users?page=1").unwrap();
assert_eq!(referer.scheme(), Some("https"));
assert_eq!(referer.hostname(), Some("example.com"));
assert_eq!(referer.path(), "/api/users");
assert_eq!(referer.query(), Some("page=1"));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant