Skip to content

Commit

Permalink
Don't cache the actual IPs, EVER
Browse files Browse the repository at this point in the history
  • Loading branch information
randomairborne committed Feb 11, 2024
1 parent 37a994a commit 8d28021
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ impl IntoResponse for HtmlOrRaw {
fn into_response(self) -> Response {
match self {
Self::Html(v) => axum::response::Html(v).into_response(),
Self::Raw(v) => v.into_response(),
Self::Raw(v) => {
let mut resp = v.into_response();
resp.headers_mut()
.insert("Cache-Control", HeaderValue::from_str("no-store").unwrap());
resp
}
}
}
}
Expand Down

0 comments on commit 8d28021

Please sign in to comment.