Spaces:
Running
Running
Kasumi
commited on
server : set default CORS headers to allow all (#1567)
Browse files
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 |
|