junobuild_storage/
constants.rs

1use crate::http::types::StatusCode;
2
3pub const ASSET_ENCODING_NO_COMPRESSION: &str = "identity";
4pub const ENCODING_CERTIFICATION_ORDER: &[&str] = &[
5    ASSET_ENCODING_NO_COMPRESSION,
6    "gzip",
7    "compress",
8    "deflate",
9    "br",
10];
11pub const WELL_KNOWN_CUSTOM_DOMAINS: &str = "/.well-known/ic-domains";
12pub const WELL_KNOWN_II_ALTERNATIVE_ORIGINS: &str = "/.well-known/ii-alternative-origins";
13
14pub const ROOT_PATH: &str = "/";
15pub const ROOT_INDEX_HTML: &str = "/index.html";
16pub const ROOT_404_HTML: &str = "/404.html";
17pub const ROOT_PATHS: [&str; 5] = ["/index.html", "/index", "/", "/404", "/404.html"];
18
19pub const RESPONSE_STATUS_CODE_200: StatusCode = 200;
20pub const RESPONSE_STATUS_CODE_308: StatusCode = 308;
21pub const RESPONSE_STATUS_CODE_404: StatusCode = 404;
22pub const RESPONSE_STATUS_CODE_405: StatusCode = 405;
23pub const RESPONSE_STATUS_CODE_406: StatusCode = 406;
24pub const RESPONSE_STATUS_CODE_500: StatusCode = 500;
25
26pub const RAW_DOMAINS: [&str; 4] = [
27    ".raw.icp0.io",
28    ".raw.ic0.app",
29    ".raw.icp-api.io",
30    ".raw.internetcomputer.org",
31];