|
|
@ -96,14 +96,14 @@ impl UserHttpServer {
|
|
|
|
"Access-Control-Allow-Methods",
|
|
|
|
"Access-Control-Allow-Methods",
|
|
|
|
"GET,HEAD,PUT,PATCH,POST,DELETE",
|
|
|
|
"GET,HEAD,PUT,PATCH,POST,DELETE",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.with_additional_header("Vary", "Access-Control-Request-Headers")
|
|
|
|
.with_additional_header("Vary", "Access-Control-Allow-Headers");
|
|
|
|
.with_additional_header(
|
|
|
|
|
|
|
|
"Access-Control-Request-Headers",
|
|
|
|
if let Some(request_headers) = request.header("Access-Control-Request-Headers") {
|
|
|
|
request
|
|
|
|
response = response.with_additional_header(
|
|
|
|
.header("Access-Control-Request-Headers")
|
|
|
|
"Access-Control-Allow-Headers",
|
|
|
|
.unwrap_or("content-type")
|
|
|
|
request_headers.to_string(),
|
|
|
|
.to_string(),
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|