Skip to content

Commit

Permalink
Fix proxy connection setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Sep 13, 2024
1 parent fc4b130 commit 6eb609e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fixtures/cloudflare/a_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

require "cloudflare"
require "sus/fixtures/async/reactor_context"
require "async/http/proxy"

module Cloudflare
AUTH_EMAIL = ENV["CLOUDFLARE_EMAIL"]
Expand Down Expand Up @@ -32,7 +33,7 @@ module Cloudflare
if proxy_url = PROXY_URL
proxy_endpoint = Async::HTTP::Endpoint.parse(proxy_url)
@client = Async::HTTP::Client.new(proxy_endpoint)
@connection = Cloudflare.connect(@client.proxied_endpoint(ENDPOINT), email: AUTH_EMAIL, key: AUTH_KEY)
@connection = Cloudflare.connect(@client.proxied_endpoint(Connection::ENDPOINT), email: AUTH_EMAIL, key: AUTH_KEY)
else
@client = nil
@connection = Cloudflare.connect(email: AUTH_EMAIL, key: AUTH_KEY)
Expand Down

0 comments on commit 6eb609e

Please sign in to comment.