feat: implement CORS support with configuration options and middleware integration
This commit is contained in:
@@ -88,8 +88,10 @@ pub async fn start_server() {
|
||||
|
||||
// build the axum app and run the server...
|
||||
info!("Starting application...");
|
||||
let mut app: Router =
|
||||
routes::get_root_router(Arc::new(get_app_state(&db_connection, &settings)));
|
||||
let mut app: Router = routes::get_root_router(
|
||||
Arc::new(get_app_state(&db_connection, &settings)),
|
||||
Arc::new(settings.server.cors.clone()),
|
||||
);
|
||||
|
||||
if settings.server.serve_openapi {
|
||||
info!("Enabling OpenAPI documentation endpoint at /openapi.json");
|
||||
|
||||
Reference in New Issue
Block a user