A lexicon-driven AppView for ATProto. happyview.dev
backfill firehose jetstream atproto appview oauth lexicon
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: add CORS reflection for auth requests

Trezy a685382c 69afac14

+8 -1
+8 -1
src/server.rs
··· 1 1 use axum::extract::{DefaultBodyLimit, State}; 2 2 use axum::http::HeaderMap; 3 + use axum::http::{Method, header}; 3 4 use axum::response::{IntoResponse, Response}; 4 5 use axum::routing::{get, post}; 5 6 use axum::{Json, Router}; ··· 76 77 .route("/config", get(config_endpoint)) 77 78 .fallback_service(serve_dir) 78 79 .layer(TraceLayer::new_for_http()) 79 - .layer(CorsLayer::permissive()) 80 + .layer( 81 + CorsLayer::new() 82 + .allow_origin(tower_http::cors::AllowOrigin::mirror_request()) 83 + .allow_methods([Method::GET, Method::POST, Method::OPTIONS]) 84 + .allow_headers([header::CONTENT_TYPE, header::AUTHORIZATION, header::COOKIE]) 85 + .allow_credentials(true), 86 + ) 80 87 .with_state(state) 81 88 } 82 89