Skip to content

feat(client): send the API key in the X-API-Key header - #38

Merged
pbennett merged 1 commit into
mainfrom
feat/api-key-header
Nov 1, 2026
Merged

pbennett merged 1 commit into
mainfrom
feat/api-key-header

Conversation

@pbennett

@pbennett pbennett commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

fetchQuote no longer puts apiKey in the URL, and fetchSwapTransactions no longer puts it in the POST body: both send it in the X-API-Key header, keeping it out of server logs, browser history and caches. The Haystack Router refuses secret (hay_sk_) keys in the URL. The logger also redacts an X-API-Key header.

The router accepts the header and allows it in CORS preflights since haystack-router f74b3d2, live on mainnet (checked: a quote with the key only in the header returns 200, and an OPTIONS preflight for x-api-key is allowed).

fetchQuote no longer puts apiKey in the URL, and fetchSwapTransactions
no longer puts it in the POST body: both send it in the X-API-Key
header, keeping it out of server logs, browser history and caches. The
Haystack Router refuses secret (hay_sk_) keys in the URL. The logger
also redacts an X-API-Key header.
@pbennett
pbennett merged commit d4fc2a4 into main Nov 1, 2026
1 check passed
@pbennett
pbennett deleted the feat/api-key-header branch November 1, 2026 07:59
txnlab-release-bot Bot added a commit that referenced this pull request Nov 1, 2026
# [3.3.0](v3.2.0...v3.3.0) (2026-11-01)

### Features

* **client:** send the API key in the X-API-Key header ([#38](#38)) ([d4fc2a4](d4fc2a4))
@txnlab-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant