INNER CODE UNIT · Rust

Some

Trow-Registry/trow · src/routes/mod.rs:85

                    if let Some(0) = body.size_hint().upper() {
                        let err = Error::NotFound.to_string();

                        *body = Body::from(err.clone());
                        r.headers_mut()
                            .insert(header::CONTENT_LENGTH, err.len().into());
                    }
                }
                r
            }),
    );

    if let Some(domains) = &cors_domains {
        app = app.layer(
            cors::CorsLayer::new()
                .allow_credentials(true)
                .allow_headers([header::AUTHORIZATION, header::CONTENT_TYPE])
                .allow_methods([Method::GET, Method::POST, Method::OPTIONS])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…