Skip to content
Snippets Groups Projects
Commit 5479759b authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Add Origin header to CORS

parent c7112e99
No related branches found
No related tags found
No related merge requests found
......@@ -129,8 +129,7 @@ async fn main() -> std::io::Result<()> {
cors = cors.allowed_origin(endpoint.domain.clone().as_str());
}
cors = cors.allowed_methods(vec!["GET", "POST"])
.allowed_headers(vec![header::AUTHORIZATION, header::ACCEPT])
.allowed_header(header::CONTENT_TYPE)
.allowed_headers(vec![header::AUTHORIZATION, header::ACCEPT, header::CONTENT_TYPE, header::ORIGIN])
.max_age(3600);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment