Repository navigation
feat(edge): header sanitization, underscore smuggling defense, and upstream error interception - #10
Merged
Conversation
…, and upstream hiding
ATLURI0001
deleted the
feat/header-sanitization-and-upstream-hardening
branch
November 19, 2026 05:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edge Header Sanitization & Smuggling Defense Contracts
When reverse proxy gateways negotiate ingress traffic to internal container pools, ambiguous HTTP header specifications permit subtle request smuggling and header injection vectors:
X_FORWARDED_FORbecomesX-Forwarded-FororHTTP_X_FORWARDED_FOR), allowing malicious clients to spoof internal proxy headers.Server: Python/3.11 aiohttp/3.8.5orX-Powered-By), leaking internal framework topologies to outside scanners.underscores_in_headers off;nginx.conf)ignore_invalid_headers on;nginx.conf)proxy_hide_header Server;proxy.conf)proxy_hide_header X-Powered-By;proxy.conf)proxy_set_header X-Forwarded-Host;proxy.conf)$hostproxy_set_header X-Forwarded-Port;proxy.conf)$server_portproxy_intercept_errors on;proxy.conf)Verification Matrix
python -m unittest tests/test_project.pytest_header_sanitization_and_smuggling_defense: Validatesunderscores_in_headers,ignore_invalid_headers, header stripping (Server,X-Powered-By), host/port forwarding, and error interception.