1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/// Default URL mount prefix served by [`crate::StaticFilesHook`].
pub const DEFAULT_STATIC_MOUNT_PREFIX: &str = "/";
/// Default directory index filename.
pub const DEFAULT_STATIC_INDEX_FILE: &str = "index.html";
/// Default `Cache-Control` header applied to served static files.
pub const DEFAULT_STATIC_CACHE_CONTROL: &str = "public, max-age=3600";
/// Default maximum total memory budget for the sharded hot-file cache (32 MiB).
pub const DEFAULT_STATIC_MAX_CACHE_BYTES: usize = 32 * 1024 * 1024;
/// Default maximum single file size eligible for in-memory hot caching (1 MiB).
pub const DEFAULT_STATIC_MAX_FILE_CACHE_BYTES: usize = 1024 * 1024;
/// Number of independent hot-file cache shards (`64`, power of two).
pub const STATIC_CACHE_SHARDS: usize = 64;
/// `Accept-Ranges` value advertising byte-range support.
pub const ACCEPT_RANGES_BYTES: &str = "bytes";
/// `Range` header unit prefix.
pub const RANGE_BYTES_PREFIX: &str = "bytes=";
/// `Content-Encoding` token for Brotli precompressed sidecars.
pub const ENCODING_BR: &str = "br";
/// `Content-Encoding` token for Gzip precompressed sidecars.
pub const ENCODING_GZIP: &str = "gzip";
/// File extension suffix for Brotli sidecar assets.
pub const SIDECAR_BR_EXT: &str = ".br";
/// File extension suffix for Gzip sidecar assets.
pub const SIDECAR_GZ_EXT: &str = ".gz";
/// `Vary` token emitted when serving negotiated precompressed sidecars.
pub const VARY_ACCEPT_ENCODING: &str = "Accept-Encoding";