Skip to main content

create_app

Function create_app 

Source
pub fn create_app(state: Arc<OAuthState>, cors_config: &CorsConfig) -> Router
Expand description

Create the OAuth Axum router.

CORS is outermost (applied last) so OPTIONS preflights are handled before any inner middleware (like logging) runs. This fixes the previous ordering where logging was outermost and CORS was inner.