fix: cors warning

This commit is contained in:
Timo Kösters 2022-04-07 17:09:07 +02:00
parent b6b27b66c8
commit 00b362b43b
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
use crate::{database::DatabaseGuard, Error, utils, Result, Ruma};
use ruma::api::client::{typing::create_typing_event, error::ErrorKind};
use crate::{database::DatabaseGuard, utils, Error, Result, Ruma};
use ruma::api::client::{error::ErrorKind, typing::create_typing_event};
/// # `PUT /_matrix/client/r0/rooms/{roomId}/typing/{userId}`
///

View file

@ -141,7 +141,7 @@ async fn run_server(config: &Config, db: Arc<RwLock<Database>>) -> io::Result<()
.compression()
.layer(
CorsLayer::new()
.allow_origin(cors::any())
.allow_origin(cors::Any)
.allow_methods([
Method::GET,
Method::POST,