Skip to content
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

allow to configure Finch pools #4270

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

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Jun 24, 2024

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 added the self-hosting Anything self-hosted label Jun 24, 2024
@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
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
1 participant