llama.cpp
llama.cpp copied to clipboard
server: fix api CORS preflight error
Add
// If it's browser preflight, skip validation
if (req.method == "OPTIONS") {
return true;
}
to server.cpp middleware_validate_api_key will make API CORS works.
Please submit a PR :)
This issue was closed because it has been inactive for 14 days since being marked as stale.