Skip to content

Commit 42cc7cf

Browse files
authored
Add comment before dumping headers in Python server example (#3083)
Addresses #2905 (comment). ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent a1ec8b8 commit 42cc7cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/python/pokemon_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ async def check_content_type_header(request: Request, next: Next) -> Response:
179179
if content_type in ["application/json", "application/vnd.amazon.eventstream"]:
180180
logging.debug("found valid `%s` content type", content_type)
181181
else:
182+
# Note that dumping all headers may log sensitive information! You
183+
# probably don't want to do this in production.
182184
logging.warning(
183185
"invalid content type %s, dumping headers: %s",
184186
content_type,

0 commit comments

Comments
 (0)