Add comment before dumping headers in Python server example (#3083)

Addresses
https://github.com/awslabs/smithy-rs/pull/2905#discussion_r1366932417.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This commit is contained in:
david-perez 2023-12-19 16:16:12 +01:00 committed by GitHub
parent a1ec8b89a7
commit 42cc7cf557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -179,6 +179,8 @@ async def check_content_type_header(request: Request, next: Next) -> Response:
if content_type in ["application/json", "application/vnd.amazon.eventstream"]:
logging.debug("found valid `%s` content type", content_type)
else:
# Note that dumping all headers may log sensitive information! You
# probably don't want to do this in production.
logging.warning(
"invalid content type %s, dumping headers: %s",
content_type,