JiriSko / amixer-webui

Web application for control ALSA volume
MIT License
53 stars 21 forks source link

Fix content-type for 'hostname' #24

Closed saffroy closed 1 year ago

saffroy commented 1 year ago

When running the app behind a reverse proxy (apache+mod_proxy+mod_proxy_html) I noticed that the reported host name is garbled, with extra tags around the actual host name.

This is because the content-type for the data returned by the backend for the host name isn't forced to JSON (even though the web app code does seem to expect JSON, even if just a plain string), and the middleware decides to "fix" the content.

The proposed fix is to return actual JSON with the proper content-type.