summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/routes.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes.rs b/src/routes.rs
index 165dfb6..897b3cb 100644
--- a/src/routes.rs
+++ b/src/routes.rs
@@ -6,6 +6,7 @@ use axum::{
response::IntoResponse,
};
use axum_extra::routing::RouterExt;
+use tower_http::cors::CorsLayer;
use crate::{jwt::authenticate, state::AppState};
@@ -24,6 +25,7 @@ pub fn init_router(state: Arc<AppState>) -> axum::Router {
.typed_get(user::UserUuid::get)
.typed_post(register::Register::post)
.typed_post(login::Login::post)
+ .layer(CorsLayer::permissive())
.fallback(fallback)
.with_state(state)
}