The Astro middleware calls response.text(), which breaks for endpoints that serve binary data.
Couldn't find a way to selectively disable the middleware based on Content-Type header or file extension, so I worked around this in my own project by creating a meta-middleware that selectively applies the astro-shield middleware based on the file extension seen in the request URL.
The Astro middleware calls
response.text(), which breaks for endpoints that serve binary data.Couldn't find a way to selectively disable the middleware based on
Content-Typeheader or file extension, so I worked around this in my own project by creating a meta-middleware that selectively applies theastro-shieldmiddleware based on the file extension seen in the request URL.