Added a super simple CORS header as default for all endpoints.

This commit is contained in:
digiwombat 2023-05-31 19:54:05 -04:00
parent bed308c69c
commit 342604bb81

View file

@ -674,6 +674,8 @@ int main(int argc, char **argv)
Server svr; Server svr;
svr.set_default_headers({ {"Access-Control-Allow-Origin", "*"} });
svr.Get("/", [](const Request &, Response &res) svr.Get("/", [](const Request &, Response &res)
{ res.set_content("<h1>llama.cpp server works</h1>", "text/html"); }); { res.set_content("<h1>llama.cpp server works</h1>", "text/html"); });