Ensure SPA HTML files get loaded with UTF-8 encoding
Fixes issues with wrong encoding of the "Loading Funkwhale…" text in index.html
. If loaded via the backend the index.html
got read with latin1 encoding, resulting in the ellipsis character being garbled as shown in the screenshot.
The reason is for how the requests module handles the encoding and tries to read it from the HTTP headers, see https://requests.readthedocs.io/en/latest/user/advanced/#encodings
Explicitly set response.encoding
to enforce proper encoding is used for reading.