WEB + Apple iOS Fallback Cache fixed

Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
Alexey
2026-08-23 18:05:12 +03:00
parent 1bd85535f4
commit 3188c8e417
2 changed files with 40 additions and 1 deletions
+10 -1
View File
@@ -17,6 +17,7 @@ use crate::config::{WebRuntimeDecoy, WebRuntimeVhost};
use crate::web::manager::WebProcessRuntime;
/// Serves the configured ordinary site after optionally removing carrier material.
/// Transport-sanitized static fallbacks remain uncacheable after query removal.
pub(super) async fn serve_decoy<B>(
mut request: Request<B>,
vhost: Arc<WebRuntimeVhost>,
@@ -41,7 +42,15 @@ where
};
let request = Request::from_parts(parts, body);
match &vhost.decoy {
WebRuntimeDecoy::StaticDirectory(site) => serve_static(request, site),
WebRuntimeDecoy::StaticDirectory(site) => {
let mut response = serve_static(request, site);
if sanitize_transport {
response
.headers_mut()
.insert(header::CACHE_CONTROL, HeaderValue::from_static("no-store"));
}
response
}
WebRuntimeDecoy::HttpUpstream { addr, authority } => {
proxy_to_upstream(
request,