From 2fc0c248fee33e428dfc944df30b42a6072ec809 Mon Sep 17 00:00:00 2001 From: Behnam M <58621210+ibehnam@users.noreply.github.com> Date: Wed, 10 Jan 2024 00:25:45 -0500 Subject: [PATCH] Update server.cpp --- examples/server/server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 654630eb3..5a952f99b 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2801,6 +2801,8 @@ int main(int argc, char **argv) httplib::Server svr; + ServerState server_state = LOADING_MODEL; + svr.set_default_headers({{"Server", "llama.cpp"}, {"Access-Control-Allow-Origin", "*"}, {"Access-Control-Allow-Headers", "content-type"}}); @@ -2823,7 +2825,6 @@ int main(int argc, char **argv) }); - ServerState server_state = LOADING_MODEL; // load the model if (!llama.load_model(params)) {