From: Kasumi Date: Tue, 28 Nov 2023 09:55:20 +0000 (+0800) Subject: server : set default CORS headers to allow all (#1567) X-Git-Tag: upstream/1.7.4~1220 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=6b094b6dfe9a9bb9cbb8742c50fcfb8f088b745c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp server : set default CORS headers to allow all (#1567) --- 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";