use azure_core::http::ClientOptions;
use std::borrow::Cow;
pub static STORAGE_ALLOWED_HEADERS: &[&str] = &[
"access-control-allow-origin",
"x-ms-date",
"x-ms-error-code",
"x-ms-version",
"accept-ranges",
"content-disposition",
"content-encoding",
"content-language",
"content-md5",
"content-range",
"vary",
"x-ms-content-crc64",
"x-ms-copy-action",
"x-ms-copy-completion-time",
"x-ms-copy-id",
"x-ms-copy-progress",
"x-ms-copy-status",
"x-ms-copy-destination-snapshot",
"x-ms-copy-source-error-code",
"x-ms-copy-source-status-code",
"x-ms-lease-state",
"x-ms-lease-status",
"x-ms-lease-action",
"x-ms-lease-break-period",
"x-ms-lease-duration",
"x-ms-lease-id",
"x-ms-lease-time",
"x-ms-has-immutability-policy",
"x-ms-has-legal-hold",
"x-ms-range",
"x-ms-source-range",
"x-ms-request-server-encrypted",
"x-ms-server-encrypted",
"x-ms-encryption-algorithm",
"x-ms-default-encryption-scope",
"x-ms-deny-encryption-scope-override",
"x-ms-access-tier",
"x-ms-access-tier-change-time",
"x-ms-access-tier-inferred",
"x-ms-archive-status",
"x-ms-rehydrate-priority",
"x-ms-blob-type",
"x-ms-blob-sequence-number",
"x-ms-blob-content-type",
"x-ms-blob-content-md5",
"x-ms-blob-content-encoding",
"x-ms-blob-content-language",
"x-ms-blob-content-disposition",
"x-ms-blob-content-length",
"x-ms-blob-cache-control",
"x-ms-blob-public-access",
"x-ms-blob-append-offset",
"x-ms-blob-committed-block-count",
"x-ms-blob-condition-appendpos",
"x-ms-blob-condition-maxsize",
"x-ms-page-write",
"x-ms-if-sequence-number-eq",
"x-ms-if-sequence-number-le",
"x-ms-if-sequence-number-lt",
"x-ms-sequence-number-action",
"x-ms-account-kind",
"x-ms-sku-name",
"x-ms-snapshot",
"x-ms-creation-time",
"x-ms-delete-snapshots",
"x-ms-delete-type-permanent",
"x-ms-incremental-copy",
"x-ms-proposed-lease-id",
"x-ms-range-get-content-md5",
"x-ms-tag-count",
"x-ms-source-if-match",
"x-ms-source-if-modified-since",
"x-ms-source-if-none-match",
"x-ms-source-if-unmodified-since",
"x-ms-source-content-md5",
];
pub static STORAGE_ALLOWED_QUERY_PARAMETERS: &[&str] = &[
"se",
"si",
"sip",
"sp",
"spr",
"sr",
"srt",
"ss",
"st",
"sv",
"ske",
"skoid",
"sks",
"skt",
"sktid",
"skv",
"comp",
"restype",
"copyid",
"maxresults",
"include",
"marker",
"prefix",
"delimiter",
"rscc",
"rscd",
"rsce",
"rscl",
"rsct",
"blockid",
"blocklisttype",
"snapshot",
"prevsnapshot",
];
pub(crate) fn apply_storage_logging_defaults(options: &mut ClientOptions) {
options
.logging
.additional_allowed_header_names
.extend(STORAGE_ALLOWED_HEADERS.iter().map(|s| Cow::Borrowed(*s)));
options.logging.additional_allowed_query_params.extend(
STORAGE_ALLOWED_QUERY_PARAMETERS
.iter()
.map(|s| Cow::Borrowed(*s)),
);
}