Can only connect to host if I put reverse_proxy

I found this similar issue: Need help configuring caddy & l4 for git ssh access on domain - Help - Caddy Community

But it’s not exactly the same. It also returns blank page. Even on my auth, which is a simple rust server, serving frontend content:

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    let dist_path = if cfg!(feature = "dev") {
        "../frontend/dist"
    } else {
        "/usr/local/share/r4gmi-auth/dist"
    };

    HttpServer::new(move || {
        App::new()
            .service(Files::new("/", dist_path).index_file("index.html").prefer_utf8(true))
            .service(Files::new("/public", format!("{}/public", dist_path)).prefer_utf8(true))
            .default_service(web::get().to(greet))
    })
    .bind("0.0.0.0:8080")?
    .run()
    .await
}

It’s still blank page. Is it because I serve frontend? Why it’s not the case for keycloak?