Skip to content

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Oct 13, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

I've seen ppl use HttpClient::create() with default base_uri & auth_bearer. That's a security risk as the bearer would be sent to any hosts that the client requests.

Instead, ppl should use ScopingHttpClient.

The new method should help to discover and use it.

nicolas-grekas added a commit that referenced this pull request Oct 14, 2019
…as-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add HttpClient::createForBaseUri()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

I've seen ppl use `HttpClient::create()` with default `base_uri` & `auth_bearer`. That's a security risk as the bearer would be sent to any hosts that the client requests.

Instead, ppl should use `ScopingHttpClient`.

The new method should help to discover and use it.

Commits
-------

1aa9a11 [HttpClient] add HttpClient::createForBaseUri()
@nicolas-grekas nicolas-grekas merged commit 1aa9a11 into symfony:4.4 Oct 14, 2019
@nicolas-grekas nicolas-grekas deleted the hc-base_uri branch October 18, 2019 14:36
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants