From 118c92af08b4df3639d599781dfd9c94bdad4b9e Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Tue, 18 Jul 2023 12:36:13 -0400 Subject: [PATCH] remove allow creds from cors --- mint/src/main.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mint/src/main.rs b/mint/src/main.rs index a4b3d71..c324b4c 100644 --- a/mint/src/main.rs +++ b/mint/src/main.rs @@ -205,16 +205,12 @@ async fn main() -> anyhow::Result<()> { .route("/check", post(post_check)) .route("/melt", post(post_melt)) .route("/info", get(get_info)) - .layer( - CorsLayer::very_permissive() - .allow_credentials(true) - .allow_headers([ - AUTHORIZATION, - CONTENT_TYPE, - ACCESS_CONTROL_ALLOW_CREDENTIALS, - ACCESS_CONTROL_ALLOW_ORIGIN, - ]), - ) + .layer(CorsLayer::very_permissive().allow_headers([ + AUTHORIZATION, + CONTENT_TYPE, + ACCESS_CONTROL_ALLOW_CREDENTIALS, + ACCESS_CONTROL_ALLOW_ORIGIN, + ])) .with_state(state); let ip = Ipv4Addr::from_str(&settings.info.listen_host)?;