Send Content-Type as api response header too

This commit is contained in:
Yonas Habteab 2020-07-10 10:42:55 +02:00
parent 04704a49a4
commit df2d30e6af
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ bool HandleAccessControl(
if (request.method() == http::verb::options && !request[http::field::access_control_request_method].empty()) {
response.result(http::status::ok);
response.set(http::field::access_control_allow_methods, "GET, POST, PUT, DELETE");
response.set(http::field::access_control_allow_headers, "Authorization, X-HTTP-Method-Override");
response.set(http::field::access_control_allow_headers, "Authorization, Content-Type, X-HTTP-Method-Override");
response.body() = "Preflight OK";
response.set(http::field::content_length, response.body().size());
response.set(http::field::connection, "close");