diff --git a/backend/src/main.rs b/backend/src/main.rs index eb163ce..733c2d4 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -3,14 +3,14 @@ use std::collections::HashMap; use axum::{ debug_handler, extract::Query, - http::{header::CONTENT_TYPE, HeaderValue, Method, StatusCode}, + http::{header::CONTENT_TYPE, Method, StatusCode}, response::IntoResponse, routing::get, Router, }; use image::{png::PngEncoder, ColorType, Luma}; use maud::{html, Markup}; -use tower_http::cors::CorsLayer; +use tower_http::cors::{Any, CorsLayer}; #[tokio::main] async fn main() { @@ -19,10 +19,7 @@ async fn main() { .route("/qr", get(get_qr_code)) .layer( CorsLayer::new() - .allow_origin("http://localhost:3000".parse::().unwrap()) - .allow_origin("http://localhost".parse::().unwrap()) - .allow_origin("http://localhost:5173".parse::().unwrap()) - .allow_origin("http://localhost:1337".parse::().unwrap()) + .allow_origin(Any) .allow_methods([Method::GET]), );