Skip to content

Send X-Internal-Api-Key on server-side API calls (WB-2026-015) - #513

Merged
lostpoint-ru merged 1 commit into
mainfrom
feature/security-wb-2026-internal-api-key
Aug 1, 2026
Merged

Send X-Internal-Api-Key on server-side API calls (WB-2026-015)#513
lostpoint-ru merged 1 commit into
mainfrom
feature/security-wb-2026-internal-api-key

Conversation

@lostpoint-ru

Copy link
Copy Markdown
Contributor

The Yii product endpoint (/ng/api/v1/product) is gated to internal callers. Add a server-only runtimeConfig.internalApiKey (from NUXT_INTERNAL_API_KEY, never exposed to the client) and attach it as X-Internal-Api-Key on server-side useApi requests, so the Nuxt renderer can reach the endpoint while the public internet cannot. Browser-side calls never carry the secret and never need it (product data is fetched server-side).


Что происходит; кому и зачем нужно:


Что поменялось для пользователей:


Как проверял/а:


Чеклист ревью:

Перед мержем не забудь проверить:

  • правописание в тексте, опечатки

Опционально (но важно для изменений в инфраструктуру):

  • задеплоить на stage, чтобы проверить, что все работает

The Yii product endpoint (/ng/api/v1/product) is gated to internal callers. Add a
server-only runtimeConfig.internalApiKey (from NUXT_INTERNAL_API_KEY, never exposed to
the client) and attach it as X-Internal-Api-Key on server-side useApi requests, so the
Nuxt renderer can reach the endpoint while the public internet cannot. Browser-side
calls never carry the secret and never need it (product data is fetched server-side).
@lostpoint-ru
lostpoint-ru requested a review from a team as a code owner August 1, 2026 12:21
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 high

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
ErrorProne 2 high

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@lostpoint-ru
lostpoint-ru merged commit f84a5a0 into main Aug 1, 2026
2 of 3 checks passed
@lostpoint-ru
lostpoint-ru deleted the feature/security-wb-2026-internal-api-key branch August 1, 2026 12:34
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.

2 participants