-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: Deno.createHttpClient allowHost #19689
Conversation
You should also test that the header is sent, not just that it's exposed in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint.
@@ -237,11 +237,11 @@ pub fn op_fetch<FP>( | |||
where | |||
FP: FetchPermissions + 'static, | |||
{ | |||
let client = if let Some(rid) = client_rid { | |||
let (client, allow_host) = if let Some(rid) = client_rid { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: This is the first time I see this sort of combination of let
and if let Some(X) = Y
. I am both in awe and appalled :D But, it makes sense after a while and was here before we got here so of course why not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. LGTM
This adds an option to allow using the host header in a fetch call.
Closes #16840
Ref #11017