From 6b094b6dfe9a9bb9cbb8742c50fcfb8f088b745c Mon Sep 17 00:00:00 2001 From: Kasumi <90275229+kasumi-1@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:55:20 +0800 Subject: [PATCH] server : set default CORS headers to allow all (#1567) --- examples/server/server.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index dc5317a0..e9d3f88b 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -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 = "hello";