Skip to content

fix: gate environment and json endpoints behind ShouldMapUiEndpoints …#135

Merged
georgidhristov merged 1 commit into
DebugProbe:mainfrom
DevSars24:fix/issue-117-production-endpoint-exposure
Jun 28, 2026
Merged

fix: gate environment and json endpoints behind ShouldMapUiEndpoints …#135
georgidhristov merged 1 commit into
DebugProbe:mainfrom
DevSars24:fix/issue-117-production-endpoint-exposure

Conversation

@DevSars24

Copy link
Copy Markdown
Contributor

Summary

Fixes #117

/debug/environment and /debug/json/{id} were accessible in Production
even when the UI was disabled. Moved all three machine-readable endpoints
inside the existing ShouldMapUiEndpoints() guard — no new flags, no logic
changes.

Changes

  • DebugProbeExtensions.cs — moved compare/{id}, environment, json/{id}
    inside the ShouldMapUiEndpoints() block
  • DebugProbeProductionEndpointTests.cs — updated test name + assertions
    to reflect correct Production behavior

Verification

  • dotnet build → 0 errors
  • dotnet test → 61/61 passing
  • git diff --stat → exactly 2 files changed

@georgidhristov georgidhristov merged commit 95ec998 into DebugProbe:main Jun 28, 2026
1 check passed
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.

Review Production Exposure of Environment and JSON Endpoints

2 participants