This commit is contained in:
icy17 2024-05-08 12:22:33 +08:00 committed by GitHub
commit bad0d6a33e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -652,7 +652,11 @@ void start_server(tr_rpc_server* server)
auto* const base = server->session->event_base();
auto* const httpd = evhttp_new(base);
if (!httpd)
{
tr_logAddError(fmt::format(_("Couldn't instantiate httpd for '{}'"), static_cast<void*>(server)));
return;
}
evhttp_set_allowed_methods(httpd, EVHTTP_REQ_GET | EVHTTP_REQ_POST | EVHTTP_REQ_OPTIONS);
auto const address = server->get_bind_address();