Skip to content

Commit 879b8e1

Browse files
committed
remove outdated cache_control from impl_axum_webpage
1 parent 456a066 commit 879b8e1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/web/page/web_page.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ macro_rules! impl_webpage {
4848

4949
#[macro_export]
5050
macro_rules! impl_axum_webpage {
51-
($page:ty = $template:literal $(, status = $status:expr)? $(, cache_control = $cache_control:expr)? $(, content_type = $content_type:expr)? $(,)?) => {
51+
($page:ty = $template:literal $(, status = $status:expr)? $(, content_type = $content_type:expr)? $(,)?) => {
5252
$crate::impl_axum_webpage!($page = |_| ::std::borrow::Cow::Borrowed($template) $(, status = $status)? $(, content_type = $content_type)?);
5353
};
5454

55-
($page:ty = $template:expr $(, status = $status:expr)? $(, cache_control = $cache_control:expr)? $(, content_type = $content_type:expr)? $(,)?) => {
55+
($page:ty = $template:expr $(, status = $status:expr)? $(, content_type = $content_type:expr)? $(,)?) => {
5656
impl axum::response::IntoResponse for $page
5757
{
5858
fn into_response(self) -> ::axum::response::Response {
@@ -71,12 +71,6 @@ macro_rules! impl_axum_webpage {
7171
(status)(&self)
7272
})
7373
)?
74-
$(
75-
.header(
76-
::axum::http::header::CACHE_CONTROL,
77-
::axum::http::HeaderValue::from_str($cache_control).unwrap(),
78-
)
79-
)?
8074
// this empty body will be replaced in `render_templates_middleware` using
8175
// the data from `DelayedTemplateRender` below.
8276
.body(::axum::body::boxed(::axum::body::Body::empty()))

0 commit comments

Comments
 (0)