How would you go about managing etags?

Hey all,

I was wondering how you managed etags of dynamic resources (like API responses). I have a simple middleware but because starlette sets StreamingResponse, it doesn’t feel right to coerce the body before it is passed onto the server.

I guess I could create a dedicated Response that generate the etag value when I return it from my handlers.

What’s the best approach you reckon folks?