You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/trow/src/response
    
    the code of the file until where you have to start completion: use axum::http::header::HeaderMap;
use tracing::{event, Level};

use crate::TrowConfig;

pub mod 
    
pub fn get_base_url(headers: &HeaderMap, config: &TrowConfig) -> String {
    let host = headers
        .get("Host")
        .expect("No host header")
        .to_str()
        .expect("invalid host header");

    // Check if we have an upstream load balancer doing TLS termination
    match headers.get("X-Forwarded-Proto").map(|h| h.to_str()) {
        Some(Ok(proto)) => {
            if proto == "http" {
                event!(Level::WARN, "Security issue! Upstream proxy is using HTTP");
            }
            format!("{}://{}", proto, host)
        }
        _ => match config.tls {
            None => format!("http://{}", host),
            Some(_) => format!("https://{}", host),
        },
    }
}