aigis 0.2.3

A simple and configurable content proxy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use axum::{
    extract::Request,
    http::{header, HeaderValue},
    middleware::Next,
    response::Response,
};

pub async fn header_middleware(request: Request, next: Next) -> Response {
    let mut response = next.run(request).await;
    response.headers_mut().append(
        header::SERVER,
        HeaderValue::from_static(env!("CARGO_PKG_NAME")),
    );
    response
        .headers_mut()
        .append("X-Robots-Tag", HeaderValue::from_static("none"));
    response
}