Skip to main content

set_headers

Function set_headers 

Source
pub fn set_headers(headers: &mut HeaderMap, url_path: &str)
Available on crate feature nextstatic only.
Expand description

按响应路径分类设置 Content-Type、Vary 与缓存头 (覆盖已有值)。 分类: RSC .txt / sw.js / manifest / robots + sitemap / /_next/static / 普通 .txt / 图片字体; 其余保持文件服务按扩展名推断的类型