Commit c08a8581 authored by bitkeeper's avatar bitkeeper Committed by Max Kellermann

Added cross-origin header to http headers of the http output.

The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream. The fix is to add the following header to the http response: Access-Control-Allow-Origin: *
parent 25b01940
...@@ -6,6 +6,7 @@ ver 0.22.7 (not yet released) ...@@ -6,6 +6,7 @@ ver 0.22.7 (not yet released)
* storage * storage
- curl: don't use glibc extension - curl: don't use glibc extension
* output * output
- httpd: send header "Access-Control-Allow-Origin: *"
- wasapi: add algorithm for finding usable audio format - wasapi: add algorithm for finding usable audio format
- wasapi: use default device only if none was configured - wasapi: use default device only if none was configured
- wasapi: add DoP support - wasapi: add DoP support
......
...@@ -162,6 +162,7 @@ HttpdClient::SendResponse() noexcept ...@@ -162,6 +162,7 @@ HttpdClient::SendResponse() noexcept
"Connection: close\r\n" "Connection: close\r\n"
"Pragma: no-cache\r\n" "Pragma: no-cache\r\n"
"Cache-Control: no-cache, no-store\r\n" "Cache-Control: no-cache, no-store\r\n"
"Access-Control-Allow-Origin: *\r\n"
"\r\n", "\r\n",
httpd.content_type); httpd.content_type);
response = buffer; response = buffer;
......
...@@ -45,6 +45,7 @@ icy_server_metadata_header(const char *name, ...@@ -45,6 +45,7 @@ icy_server_metadata_header(const char *name,
"Connection: close\r\n" "Connection: close\r\n"
"Pragma: no-cache\r\n" "Pragma: no-cache\r\n"
"Cache-Control: no-cache, no-store\r\n" "Cache-Control: no-cache, no-store\r\n"
"Access-Control-Allow-Origin: *\r\n"
"\r\n", "\r\n",
name, name,
genre, genre,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment