Skip to content

feat: add kraken_base_url config for GraphQL proxy#3668

Merged
springfall2008 merged 1 commit intomainfrom
feature/kraken-proxy-base-url
Mar 27, 2026
Merged

feat: add kraken_base_url config for GraphQL proxy#3668
springfall2008 merged 1 commit intomainfrom
feature/kraken-proxy-base-url

Conversation

@mgazza
Copy link
Copy Markdown
Collaborator

@mgazza mgazza commented Mar 26, 2026

Summary

  • Adds optional kraken_base_url config key to KrakenAPI.initialize()
  • When set, overrides the hardcoded KRAKEN_BASE_URLS for GraphQL queries
  • Allows SaaS pods to route Kraken GraphQL calls through an edge function proxy

Context

E.ON/Kraken's CloudFront WAF blocks requests from datacenter IPs (e.g. Hetzner). Token refresh works via Supabase edge functions, but direct GraphQL queries from pods get HTTP 403. This change lets us configure a proxy URL per-provider so pods route through our edge function instead.

OSS users are unaffected — without the config key, the existing hardcoded provider URLs are used.

Test plan

  • Verify OSS behaviour: no kraken_base_url in config → uses hardcoded URLs as before
  • Verify SaaS behaviour: kraken_base_url set → pod uses proxy URL for GraphQL queries
  • Confirm find-tariffs succeeds via proxy from Hetzner pod

🤖 Generated with Claude Code

E.ON/Kraken's CloudFront WAF blocks requests from datacenter IPs
(Hetzner). This adds a configurable base_url override so SaaS pods
can route GraphQL queries through a Supabase edge function proxy
instead of hitting Kraken's API directly.

OSS users are unaffected — without the config key, the hardcoded
provider URLs are used as before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mgazza mgazza force-pushed the feature/kraken-proxy-base-url branch from d7f5325 to c7f7342 Compare March 26, 2026 21:52
@springfall2008 springfall2008 merged commit b910a10 into main Mar 27, 2026
1 check passed
@springfall2008 springfall2008 deleted the feature/kraken-proxy-base-url branch March 27, 2026 07:41
@icornish72
Copy link
Copy Markdown

@mgazza - I want to assist with documentation. I personally use EDF so can assist as needed there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants