Skip to content

feat: tag outgoing data-fair API calls with a /mcp referer#2

Merged
albanm merged 1 commit into
mainfrom
feat-mcp-referer
Jul 6, 2026
Merged

feat: tag outgoing data-fair API calls with a /mcp referer#2
albanm merged 1 commit into
mainfrom
feat-mcp-referer

Conversation

@BatLeDev

@BatLeDev BatLeDev commented Jul 1, 2026

Copy link
Copy Markdown
Member

Tag outgoing calls to the data-fair API with a Referer: <baseUrl>/mcp header — but only when the MCP is self-hosted as part of the data-fair stack (no portalUrl configured, origin resolved from X-Forwarded-* headers). In standalone mode (PORTAL_URL set, connecting to a remote data-fair) no Referer is sent.

Why: a companion metrics-classification feature (data-fair/metrics) buckets API traffic by referer; this lets our own hosted MCP server's traffic land in the "mcp" bucket instead of a generic "other" one. We only want to tag traffic to our own instances, not inject a referer into third-party data-fair instances reached in standalone mode.

Heads-up: buildAxiosOptions now takes baseUrl: string instead of raw headers — all 7 call sites across 6 tool files were updated accordingly.

@github-actions github-actions Bot added feature and removed feature labels Jul 2, 2026
@BatLeDev BatLeDev force-pushed the feat-mcp-referer branch from 3fb788b to fc1e7a8 Compare July 2, 2026 07:50
@albanm albanm merged commit 6f79d37 into main Jul 6, 2026
3 checks passed
@albanm albanm deleted the feat-mcp-referer branch July 6, 2026 07:59
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.

2 participants