deislabs / wagi

Write HTTP handlers in WebAssembly with a minimal amount of work
Apache License 2.0
889 stars 45 forks source link

chore(handlers): Log the body of the response on parsing error #163

Closed adamreese closed 2 years ago

adamreese commented 2 years ago

Log the body of the response if 'location' or 'content-type' are not found.

itowlson commented 2 years ago

Um... this has the potential to leak significant user info into the logs, maybe not a big deal in a R&D environment but could be an issue in a PaaS environment. Also potentially messy if the body contains large binary data such as a photograph - how does it look if that happens, does the formatter just elide the blob?

itowlson commented 2 years ago

Actually, I guess it the leakage shouldn't be an issue because it's debug only. Ignore that.

technosophos commented 2 years ago

I was gonna raise the same concern that @itowlson did, but then @itowlson came back and convinced me that in debug mode this is fine. LOL.