Update src/fastmcp/server/dependencies.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jeremiah Lowin 2025-05-28 18:43:41 -04:00 committed by GitHub
commit ed2b9176cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,10 +63,8 @@ def get_http_headers(include_all: bool = False) -> dict[str, str]:
"proxy-connection",
}
# (just in case)
assert all(h.lower() == h for h in exclude_headers), (
"Excluded headers must be lowercase"
)
if not all(h.lower() == h for h in exclude_headers):
raise ValueError("Excluded headers must be lowercase")
headers = {}
try: