Skip to content

fix(config): support geoblock host override - #107

Open
Kewe63 wants to merge 1 commit into
Polymarket:mainfrom
Kewe63:fix/issue-97-geoblock-host-override
Open

Kewe63 wants to merge 1 commit into
Polymarket:mainfrom
Kewe63:fix/issue-97-geoblock-host-override

Conversation

@Kewe63

@Kewe63 Kewe63 commented Oct 25, 2026 •

Copy link
Copy Markdown

Summary

  • add a dedicated POLYMARKET_GEOBLOCK_HOST endpoint override
  • keep the production geoblock endpoint as the default
  • document CLOB, geoblock, and RPC endpoint overrides
  • verify routing with a loopback integration fixture

Problem

POLYMARKET_CLOB_HOST configured normal CLOB traffic, but clob geoblock continued using the hard-coded production geoblock endpoint. Fully local and staging environments could not isolate all CLOB-related requests.

Approach

The CLOB client configuration now reads an optional geoblock host independently from the main CLOB host. If the environment variable is absent, the SDK's existing production default remains unchanged.

Tests

  • loopback regression confirms GET /api/geoblock reaches the configured local host
  • cargo +1.91.1 fmt --check
  • cargo +1.91.1 clippy --locked --all-targets -- -D warnings
  • git diff --check

Risk

Low. Default production behavior is unchanged; the new path is opt-in through an environment variable.

Fixes #97


Note

Low Risk
Opt-in env override only; production defaults are unchanged when the variable is unset.

Overview
Adds POLYMARKET_GEOBLOCK_HOST so geoblock checks (e.g. clob geoblock) can target a different host than the main CLOB API. Previously only POLYMARKET_CLOB_HOST was honored; geoblock still hit the production Polymarket URL, which blocked fully local/staging setups.

CLOB client creation in auth.rs now builds SDK config from that env var when set; otherwise behavior stays on the SDK production default. The README documents this alongside existing POLYMARKET_CLOB_HOST and POLYMARKET_RPC_URL overrides.

An integration test spins up a loopback HTTP server and asserts clob geoblock issues GET /api/geoblock to the configured host and returns the fixture JSON.

Reviewed by Cursor Bugbot for commit 403c125. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

[Bug]: CLOB host override does not apply to geoblock requests

1 participant