sif-server-proxy-api-config

Diagnose server proxy and environment configuration mismatches for API and frontend paths.

2|Updated Jun 3, 2022
One-click install
npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-server-proxy-api-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sif-server-proxy-api-config
Source: https://github.com/navikt/sif-brukerdialog/tree/main/.github/skills/sif-server-proxy-api-config
Command: npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-server-proxy-api-config

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a guided diagnostic workflow to verify that a web application's server proxy configuration, API client initialization, and environment variable mappings are correct, preventing misrouted requests and deployment issues.

Core Features & Use Cases

  • Diagnoses configuration mismatches between frontend paths, API endpoints, and reverse proxy rules.
  • Verifies consistency across app init, environment schemas, and nais.json files for dev and prod.
  • Produces an actionable diagnostic report detailing mismatches and concrete fixes before deployment.

Quick Start

Run a diagnostic pass to verify app init, env schemas, and reverse proxy mappings, then record mismatches and fixes.

Frequently Asked Questions about sif-server-proxy-api-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose reverse proxy routing mismatches between API paths and frontend paths?

Server proxy configuration mismatches are diagnosed by verifying /api paths and PUBLIC_PATH frontend paths against environment variables and nais.json. The workflow checks reverseProxy.ts and initApiClients.ts to produce an actionable report of inconsistencies and fixes.

Why does my frontend path routing fail after updating environment variables across dev and prod?

Frontend path routing fails when PUBLIC_PATH and *_FRONTEND_PATH variables do not align with nais.json configurations across dev and prod. Diagnose these environment schema mismatches to identify incorrect ingoingUrl path mappings and resolve deployment issues.

What is the best way to verify API client initialization against reverse proxy rules?

The best way to verify API client initialization is to cross-check initApiClients.ts against server reverseProxy.ts. Ensure *_API_SCOPE and *_API_URL variables map correctly to the reverse proxy rules to prevent misrouted requests before deployment.

Does this diagnostic workflow support verifying nais.json configurations for both dev and prod environments?

Yes, the diagnostic workflow supports verifying nais.json configurations across both dev and prod environments. It checks consistency between app initialization, environment schemas, and reverse proxy mappings to ensure correct routing in each deployment target.

How do I fix misrouted API requests caused by incorrect server proxy environment mappings?

Fix misrouted API requests by running a diagnostic pass to verify app init, env schemas, and reverse proxy mappings. The resulting diagnostic report records mismatches between *_API_URL variables and proxy rules, providing concrete fixes to correct the routing.

When should I run a server proxy configuration diagnostic check?

Run a server proxy configuration diagnostic check before deployment when updating environment variables, nais.json files, or reverse proxy rules. This prevents misrouted requests by verifying path consistency across initApiClients.ts, frontendPath mappings, and reverseProxy.ts.