From 114f6607076ae546a61c5301cc1dd15bd108fc0b Mon Sep 17 00:00:00 2001 From: trivernis Date: Thu, 17 Sep 2020 16:31:18 +0200 Subject: [PATCH] Add Access-Control-Request-Headers header Signed-off-by: trivernis --- src/server/http_server.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/http_server.rs b/src/server/http_server.rs index fbd1df1..4d0d0fa 100644 --- a/src/server/http_server.rs +++ b/src/server/http_server.rs @@ -96,7 +96,14 @@ impl UserHttpServer { "Access-Control-Allow-Methods", "GET,HEAD,PUT,PATCH,POST,DELETE", ) - .with_additional_header("Vary", "Access-Control-Request-Headers"); + .with_additional_header("Vary", "Access-Control-Request-Headers") + .with_additional_header( + "Access-Control-Request-Headers", + request + .header("Access-Control-Request-Headers") + .unwrap_or("content-type") + .to_string(), + ); } response