Added allow credentials
This commit is contained in:
@@ -12,6 +12,7 @@ async fn options(app_state: Data<AppState>) -> impl Responder {
|
||||
app_state.allow_origins.join(","),
|
||||
))
|
||||
.append_header(("Access-Control-Allow-Methods", "GET, OPTIONS"))
|
||||
.append_header(("Access-Control-Allow-Headers", "Content-Type"))
|
||||
.append_header(("Access-Control-Allow-Headers", "Content-Type, Authorization"))
|
||||
.append_header(("Access-Control-Allow-Credentials", "true"))
|
||||
.finish()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user