Kasumi commited on
Commit
531e483
·
unverified ·
1 Parent(s): a5ad309

server : set default CORS headers to allow all (#1567)

Browse files
Files changed (1) hide show
  1. examples/server/server.cpp +3 -0
examples/server/server.cpp CHANGED
@@ -468,6 +468,9 @@ int main(int argc, char ** argv) {
468
  whisper_ctx_init_openvino_encoder(ctx, nullptr, params.openvino_encode_device.c_str(), nullptr);
469
 
470
  Server svr;
 
 
 
471
 
472
  std::string const default_content = "<html>hello</html>";
473
 
 
468
  whisper_ctx_init_openvino_encoder(ctx, nullptr, params.openvino_encode_device.c_str(), nullptr);
469
 
470
  Server svr;
471
+ svr.set_default_headers({{"Server", "whisper.cpp"},
472
+ {"Access-Control-Allow-Origin", "*"},
473
+ {"Access-Control-Allow-Headers", "content-type"}});
474
 
475
  std::string const default_content = "<html>hello</html>";
476