Skip to content

Conversation

@calvinstudebaker
Copy link
Member

@calvinstudebaker calvinstudebaker commented Dec 6, 2025

…g environment to enhance security

refactor(builds.rs): replace reqwest client instantiation with a custom create_http_client function for better configuration management
refactor(config.rs): include optional Cloudflare Access fields in the Config struct to support dynamic credential loading
refactor(entrypoint.rs): utilize the new create_http_client function for consistent HTTP client configuration across the application


Note

Adds optional Cloudflare Access credentials and a centralized HTTP client, updating API requests to use it.

  • Config:
    • Add optional cf_access_client_id and cf_access_client_secret to Config loaded from compile-time env.
    • Introduce create_http_client() that injects CF-Access-* headers when api_host targets staging.wavedash.gg.
  • Build script (build.rs):
    • Export optional env vars: CF_ACCESS_CLIENT_ID, CF_ACCESS_CLIENT_SECRET if present.
  • API calls:
    • Replace reqwest::Client::new() with config::create_http_client() in src/builds.rs and src/dev/entrypoint.rs for all requests.
  • Config accessors:
    • Keep get("api_host") and keyring config unchanged; extend internals without altering public keys.

Written by Cursor Bugbot for commit fa12038. This will update automatically on new commits. Configure here.

…g environment to enhance security

refactor(builds.rs): replace reqwest client instantiation with a custom create_http_client function for better configuration management
refactor(config.rs): include optional Cloudflare Access fields in the Config struct to support dynamic credential loading
refactor(entrypoint.rs): utilize the new create_http_client function for consistent HTTP client configuration across the application
@franzwarning franzwarning merged commit 99b60ea into main Dec 12, 2025
7 checks passed
@franzwarning franzwarning deleted the staging-cf-headers branch December 12, 2025 18:09
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