feat(http): make Gun the default HTTP client
Hackney 4 reads every response completely before Pleroma can check its size, so max_body no longer limits downloads or memory there; Gun stops at the limit. Document the Hackney limitation for those who switch back.
This commit is contained in:
parent
1be50ed28b
commit
b2e4580a81
4 changed files with 26 additions and 1 deletions
|
|
@ -541,6 +541,15 @@ Available caches:
|
|||
|
||||
## HTTP client
|
||||
|
||||
Pleroma uses [Gun](https://github.com/ninenines/gun) for outgoing HTTP requests. To use Hackney instead:
|
||||
|
||||
```elixir
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
```
|
||||
|
||||
!!! note
|
||||
With Hackney, size limits for fetched responses (for example for link previews) are checked only after Hackney has read the whole response. They limit what Pleroma keeps, not how much it downloads or holds in memory. Gun stops reading at the limit.
|
||||
|
||||
### :http
|
||||
|
||||
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`)
|
||||
|
|
@ -550,6 +559,8 @@ Available caches:
|
|||
|
||||
### :hackney_pools
|
||||
|
||||
*For `hackney` adapter*
|
||||
|
||||
Advanced. Tweaks Hackney (http client) connections pools.
|
||||
|
||||
There's three pools used:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue