Skip to content

allow to configure Finch pools - #4270

Merged
zoldar merged 1 commit into
masterfrom
allow-finch-config
Jul 15, 2024
Merged

zoldar merged 1 commit into
masterfrom
allow-finch-config

Conversation

@ruslandoga

@ruslandoga ruslandoga commented Jun 24, 2024 •

Copy link
Copy Markdown
Contributor

Changes

Closes #4269

This PR allows to configure Finch pools which are used by the Plausible HTTP client.

Example configuration to enable proxying:

import Config

if http_proxy = System.get_env("HTTP_PROXY") do
  # Plausible uses HTTPS, and our HTTP client (Mint) doesn't support HTTPS->HTTPS proxying
  # https://hexdocs.pm/mint/Mint.HTTP.html#connect/4-proxying recommends HTTP->HTTPS in this case
  %URI{scheme: "http", host: host, port: port} = URI.parse(http_proxy)
  config :plausible, Plausible.Finch, conn_opts: [proxy: {:http, host, port, _opts = []}]
end

Tests

  • Automated tests are not required

Changelog

  • Entry is not required

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@ruslandoga
ruslandoga force-pushed the allow-finch-config branch 3 times, most recently from 46f9ba3 to ae99b2f Compare June 24, 2024 15:12
@ruslandoga
ruslandoga force-pushed the allow-finch-config branch from ae99b2f to 83b9dab Compare June 24, 2024 15:12
@ruslandoga ruslandoga added the self-hosting Anything self-hosted label Jun 24, 2024
@ruslandoga ruslandoga mentioned this pull request Jun 24, 2024
2 tasks done
@ruslandoga
ruslandoga marked this pull request as ready for review June 30, 2024 04:46
@ruslandoga
ruslandoga requested a review from a team June 30, 2024 04:46
@zoldar
zoldar merged commit 922b9ab into master Jul 15, 2024
@zoldar
zoldar deleted the allow-finch-config branch July 15, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

self-hosting Anything self-hosted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPClient not support HTTP/HTTPS proxy

2 participants