X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=mixer.cpp;fp=mixer.cpp;h=55604c15115a0d7d1c84f032ba3a540ebce43df2;hp=70175a163c4a2c9a51be1690a9c9c408ac16f81f;hb=d3e48df512d9476d3849227067792a3537bb094e;hpb=9e47a2f661b9d292598ef0277e507458e3dad62f diff --git a/mixer.cpp b/mixer.cpp index 70175a1..55604c1 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -356,11 +356,11 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) // Must be instantiated after VideoEncoder has initialized global_flags.use_zerocopy. theme.reset(new Theme(global_flags.theme_filename, global_flags.theme_dirs, resource_pool.get(), num_cards)); - httpd.add_endpoint("/channels", bind(&Mixer::get_channels_json, this)); + httpd.add_endpoint("/channels", bind(&Mixer::get_channels_json, this), HTTPD::ALLOW_ALL_ORIGINS); for (int channel_idx = 2; channel_idx < theme->get_num_channels(); ++channel_idx) { char url[256]; snprintf(url, sizeof(url), "/channels/%d/color", channel_idx); - httpd.add_endpoint(url, bind(&Mixer::get_channel_color_http, this, unsigned(channel_idx))); + httpd.add_endpoint(url, bind(&Mixer::get_channel_color_http, this, unsigned(channel_idx)), HTTPD::ALLOW_ALL_ORIGINS); } // Start listening for clients only once VideoEncoder has written its header, if any.