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

pull/1568/head
Kasumi 2023-11-28 17:55:20 +08:00 committed by GitHub
parent 641f2f4282
commit 6b094b6dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -468,6 +468,9 @@ int main(int argc, char ** argv) {
whisper_ctx_init_openvino_encoder(ctx, nullptr, params.openvino_encode_device.c_str(), nullptr);
Server svr;
svr.set_default_headers({{"Server", "whisper.cpp"},
{"Access-Control-Allow-Origin", "*"},
{"Access-Control-Allow-Headers", "content-type"}});
std::string const default_content = "<html>hello</html>";