SYMBOL INDEX (510 symbols across 43 files) FILE: secure/_internal/configured_headers.py class ConfiguredHeaders (line 17) | class ConfiguredHeaders(list[BaseHeader]): method __init__ (line 20) | def __init__( method replace_all (line 29) | def replace_all(self, headers: Iterable[HeaderInput]) -> None: method append (line 35) | def append(self, header: HeaderInput) -> None: method extend (line 39) | def extend(self, headers: Iterable[HeaderInput]) -> None: method insert (line 43) | def insert(self, index: int, header: HeaderInput) -> None: method __setitem__ (line 48) | def __setitem__(self, index: int, header: HeaderInput) -> None: ... method __setitem__ (line 51) | def __setitem__(self, index: slice, header: Iterable[HeaderInput]) -> ... method __setitem__ (line 53) | def __setitem__(self, index: int | slice, header: HeaderInput | Iterab... method __delitem__ (line 63) | def __delitem__(self, index: int | slice) -> None: method clear (line 67) | def clear(self) -> None: method pop (line 71) | def pop(self, index: int = -1) -> BaseHeader: method remove (line 76) | def remove(self, header: BaseHeader) -> None: method reverse (line 80) | def reverse(self) -> None: method sort (line 84) | def sort(self, *, key: Callable[[BaseHeader], Any] | None = None, reve... method __iadd__ (line 88) | def __iadd__(self, headers: Iterable[HeaderInput]) -> ConfiguredHeaders: function header_items_from_objects (line 93) | def header_items_from_objects(headers: Iterable[BaseHeader]) -> HeaderIt... function header_mapping_from_items (line 97) | def header_mapping_from_items(items: HeaderItems) -> MappingProxyType[st... function _coerce_header_object (line 111) | def _coerce_header_object(header: HeaderInput, *, operation: str) -> Bas... FILE: secure/_internal/emit.py class HeaderSetError (line 12) | class HeaderSetError(RuntimeError): function set_headers_sync (line 16) | def set_headers_sync(response: ResponseProtocol, items: HeaderItems) -> ... function set_headers_async (line 36) | async def set_headers_async(response: ResponseProtocol, items: HeaderIte... function _get_headers_container (line 47) | def _get_headers_container(response: ResponseProtocol) -> object: function _set_headers_container_sync (line 53) | def _set_headers_container_sync(headers: object, items: HeaderItems) -> ... function _set_headers_container_async (line 71) | async def _set_headers_container_async(headers: object, items: HeaderIte... function _apply_sync_setter (line 80) | def _apply_sync_setter( function _apply_async_setter (line 101) | async def _apply_async_setter(setter: object, items: HeaderItems) -> None: function _set_headers_mapping_sync (line 113) | def _set_headers_mapping_sync(headers: object, items: HeaderItems) -> None: function _set_headers_mapping_async (line 131) | async def _set_headers_mapping_async(headers: object, items: HeaderItems... FILE: secure/_internal/normalize.py class _NormalizationOptions (line 23) | class _NormalizationOptions: function normalize_header_items (line 30) | def normalize_header_items( function _validate_header_pair (line 74) | def _validate_header_pair( function _handle_invalid (line 129) | def _handle_invalid(message: str, *, options: _NormalizationOptions) -> ... function _value_is_allowed (line 136) | def _value_is_allowed(value: str, *, allow_obs_text: bool) -> bool: function _is_allowed_value_char (line 140) | def _is_allowed_value_char(char: str, *, allow_obs_text: bool) -> bool: function _sanitize_value (line 150) | def _sanitize_value(name: str, value: str, *, strict: bool, allow_obs_te... FILE: secure/_internal/policy.py function deduplicate_header_objects (line 16) | def deduplicate_header_objects( function allowlist_header_objects (line 70) | def allowlist_header_objects( # noqa: PLR0913 function _require_header_object (line 120) | def _require_header_object(header: object, *, operation: str) -> BaseHea... function _clone_as_custom_header (line 126) | def _clone_as_custom_header(name: str, value: str) -> BaseHeader: function _resolve_duplicate_headers (line 130) | def _resolve_duplicate_headers( function _is_allowed_header_name (line 161) | def _is_allowed_header_name( FILE: secure/_internal/presets.py class Preset (line 23) | class Preset(Enum): function _baseline_content_security_policy (line 31) | def _baseline_content_security_policy() -> ContentSecurityPolicy: function preset_kwargs (line 49) | def preset_kwargs(preset: Preset) -> dict[str, object]: FILE: secure/_internal/types.py class HeadersProtocol (line 10) | class HeadersProtocol(Protocol): method headers (line 12) | def headers(self) -> object: ... class SetHeaderProtocol (line 15) | class SetHeaderProtocol(Protocol): method set_header (line 16) | def set_header(self, key: str, value: str) -> object | None: ... FILE: secure/headers/_validation.py function normalize_header_value (line 4) | def normalize_header_value(value: str, *, what: str = "header value") ->... FILE: secure/headers/base_header.py class HeaderName (line 10) | class HeaderName(Enum): class HeaderDefaultValue (line 61) | class HeaderDefaultValue(Enum): class BaseHeader (line 120) | class BaseHeader: method header_value (line 135) | def header_value(self) -> str: FILE: secure/headers/cache_control.py class CacheControl (line 22) | class CacheControl(BaseHeader): method header_value (line 86) | def header_value(self) -> str: method value (line 123) | def value(self, value: str) -> CacheControl: method set (line 143) | def set(self, value: str) -> CacheControl: method clear (line 147) | def clear(self) -> CacheControl: method custom (line 154) | def custom(self, directive: str) -> CacheControl: method _ensure_directive_mode (line 197) | def _ensure_directive_mode(self) -> None: method _validate_seconds (line 202) | def _validate_seconds(seconds: int) -> int: method _set_bool (line 209) | def _set_bool(self, name: str) -> None: method _set_seconds (line 213) | def _set_seconds(self, name: str, seconds: int) -> None: method immutable (line 222) | def immutable(self) -> CacheControl: method max_age (line 227) | def max_age(self, seconds: int) -> CacheControl: method max_stale (line 232) | def max_stale(self, seconds: int | None = None) -> CacheControl: method min_fresh (line 241) | def min_fresh(self, seconds: int) -> CacheControl: method must_revalidate (line 246) | def must_revalidate(self) -> CacheControl: method must_understand (line 251) | def must_understand(self) -> CacheControl: method no_cache (line 256) | def no_cache(self) -> CacheControl: method no_store (line 261) | def no_store(self) -> CacheControl: method no_transform (line 266) | def no_transform(self) -> CacheControl: method only_if_cached (line 271) | def only_if_cached(self) -> CacheControl: method private (line 276) | def private(self) -> CacheControl: method proxy_revalidate (line 281) | def proxy_revalidate(self) -> CacheControl: method public (line 286) | def public(self) -> CacheControl: method s_maxage (line 291) | def s_maxage(self, seconds: int) -> CacheControl: method s_max_age (line 296) | def s_max_age(self, seconds: int) -> CacheControl: method stale_if_error (line 300) | def stale_if_error(self, seconds: int) -> CacheControl: method stale_while_revalidate (line 305) | def stale_while_revalidate(self, seconds: int) -> CacheControl: FILE: secure/headers/content_security_policy.py class ContentSecurityPolicy (line 24) | class ContentSecurityPolicy(BaseHeader): method header_value (line 60) | def header_value(self) -> str: method value (line 80) | def value(self, value: str) -> ContentSecurityPolicy: method set (line 87) | def set(self, value: str) -> ContentSecurityPolicy: method clear (line 91) | def clear(self) -> ContentSecurityPolicy: method report_only (line 100) | def report_only(self) -> ContentSecurityPolicy: method enforce (line 105) | def enforce(self) -> ContentSecurityPolicy: method custom (line 110) | def custom(self, directive: str, *values: str) -> ContentSecurityPolicy: method custom_directive (line 114) | def custom_directive(self, directive: str, *values: str) -> ContentSec... method base_uri (line 157) | def base_uri(self, *sources: str) -> ContentSecurityPolicy: method block_all_mixed_content (line 161) | def block_all_mixed_content(self) -> ContentSecurityPolicy: method child_src (line 169) | def child_src(self, *sources: str) -> ContentSecurityPolicy: method connect_src (line 173) | def connect_src(self, *sources: str) -> ContentSecurityPolicy: method default_src (line 177) | def default_src(self, *sources: str) -> ContentSecurityPolicy: method fenced_frame_src (line 181) | def fenced_frame_src(self, *sources: str) -> ContentSecurityPolicy: method font_src (line 185) | def font_src(self, *sources: str) -> ContentSecurityPolicy: method form_action (line 189) | def form_action(self, *sources: str) -> ContentSecurityPolicy: method frame_ancestors (line 193) | def frame_ancestors(self, *sources: str) -> ContentSecurityPolicy: method frame_src (line 197) | def frame_src(self, *sources: str) -> ContentSecurityPolicy: method img_src (line 201) | def img_src(self, *sources: str) -> ContentSecurityPolicy: method manifest_src (line 205) | def manifest_src(self, *sources: str) -> ContentSecurityPolicy: method media_src (line 209) | def media_src(self, *sources: str) -> ContentSecurityPolicy: method object_src (line 213) | def object_src(self, *sources: str) -> ContentSecurityPolicy: method prefetch_src (line 217) | def prefetch_src(self, *sources: str) -> ContentSecurityPolicy: method report_to (line 225) | def report_to(self, *values: str) -> ContentSecurityPolicy: method report_uri (line 229) | def report_uri(self, *uris: str) -> ContentSecurityPolicy: method require_trusted_types_for (line 237) | def require_trusted_types_for(self, *values: str) -> ContentSecurityPo... method sandbox (line 241) | def sandbox(self, *values: str) -> ContentSecurityPolicy: method script_src (line 245) | def script_src(self, *sources: str) -> ContentSecurityPolicy: method script_src_attr (line 249) | def script_src_attr(self, *sources: str) -> ContentSecurityPolicy: method script_src_elem (line 253) | def script_src_elem(self, *sources: str) -> ContentSecurityPolicy: method style_src (line 257) | def style_src(self, *sources: str) -> ContentSecurityPolicy: method style_src_attr (line 261) | def style_src_attr(self, *sources: str) -> ContentSecurityPolicy: method style_src_elem (line 265) | def style_src_elem(self, *sources: str) -> ContentSecurityPolicy: method trusted_types (line 269) | def trusted_types(self, *values: str) -> ContentSecurityPolicy: method upgrade_insecure_requests (line 273) | def upgrade_insecure_requests(self) -> ContentSecurityPolicy: method worker_src (line 277) | def worker_src(self, *sources: str) -> ContentSecurityPolicy: method keyword (line 286) | def keyword(name: str) -> str: method nonce (line 295) | def nonce(value: str) -> str: method _touch_structured (line 308) | def _touch_structured(self) -> None: method _normalize_directive_name (line 314) | def _normalize_directive_name(directive: str) -> str: method _validate_token (line 324) | def _validate_token(token: str) -> str: FILE: secure/headers/cross_origin_embedder_policy.py class CrossOriginEmbedderPolicy (line 21) | class CrossOriginEmbedderPolicy(BaseHeader): method _normalize (line 45) | def _normalize(self, value: str) -> str: method header_value (line 54) | def header_value(self) -> str: method set (line 58) | def set(self, value: COEPDirective | str) -> CrossOriginEmbedderPolicy: method value (line 73) | def value(self, value: COEPDirective | str) -> CrossOriginEmbedderPolicy: method clear (line 77) | def clear(self) -> CrossOriginEmbedderPolicy: method unsafe_none (line 82) | def unsafe_none(self) -> CrossOriginEmbedderPolicy: method require_corp (line 91) | def require_corp(self) -> CrossOriginEmbedderPolicy: method credentialless (line 100) | def credentialless(self) -> CrossOriginEmbedderPolicy: FILE: secure/headers/cross_origin_opener_policy.py class CrossOriginOpenerPolicy (line 30) | class CrossOriginOpenerPolicy(BaseHeader): method header_value (line 54) | def header_value(self) -> str: method value (line 62) | def value(self, directive: str) -> CrossOriginOpenerPolicy: method custom (line 82) | def custom(self, directive: str) -> CrossOriginOpenerPolicy: method set (line 86) | def set(self, value: str) -> CrossOriginOpenerPolicy: method clear (line 94) | def clear(self) -> CrossOriginOpenerPolicy: method unsafe_none (line 108) | def unsafe_none(self) -> CrossOriginOpenerPolicy: method same_origin_allow_popups (line 120) | def same_origin_allow_popups(self) -> CrossOriginOpenerPolicy: method same_origin (line 133) | def same_origin(self) -> CrossOriginOpenerPolicy: method noopener_allow_popups (line 146) | def noopener_allow_popups(self) -> CrossOriginOpenerPolicy: FILE: secure/headers/cross_origin_resource_policy.py class CrossOriginResourcePolicy (line 23) | class CrossOriginResourcePolicy(BaseHeader): method header_value (line 44) | def header_value(self) -> str: method clear (line 48) | def clear(self) -> CrossOriginResourcePolicy: method value (line 58) | def value(self, value: str | CorpDirective) -> CrossOriginResourcePolicy: method set (line 81) | def set(self, value: str) -> CrossOriginResourcePolicy: method same_origin (line 89) | def same_origin(self) -> CrossOriginResourcePolicy: method same_site (line 94) | def same_site(self) -> CrossOriginResourcePolicy: method cross_origin (line 99) | def cross_origin(self) -> CrossOriginResourcePolicy: method _normalize_value (line 105) | def _normalize_value(value: str) -> str: FILE: secure/headers/custom_header.py class CustomHeader (line 10) | class CustomHeader(BaseHeader): method __init__ (line 29) | def __init__(self, header: str, value: str) -> None: method header_value (line 41) | def header_value(self) -> str: method set (line 50) | def set(self, value: str) -> CustomHeader: method value (line 66) | def value(self, value: str) -> CustomHeader: FILE: secure/headers/permissions_policy.py function _normalize_token (line 17) | def _normalize_token(raw: str, tokens_len: int) -> str | None: function _normalize_allowlist (line 55) | def _normalize_allowlist(tokens: tuple[str, ...]) -> str: class PermissionsPolicy (line 105) | class PermissionsPolicy(BaseHeader): method header_value (line 136) | def header_value(self) -> str: method value (line 151) | def value(self, value: str) -> PermissionsPolicy: method set (line 169) | def set(self, value: str) -> PermissionsPolicy: method clear (line 173) | def clear(self) -> PermissionsPolicy: method add_directive (line 183) | def add_directive(self, directive: str, *allowlist: str) -> Permission... method directive (line 214) | def directive(self, directive: str, *allowlist: str) -> PermissionsPol... method accelerometer (line 222) | def accelerometer(self, *allowlist: str) -> PermissionsPolicy: method ambient_light_sensor (line 226) | def ambient_light_sensor(self, *allowlist: str) -> PermissionsPolicy: method aria_notify (line 230) | def aria_notify(self, *allowlist: str) -> PermissionsPolicy: method attribution_reporting (line 234) | def attribution_reporting(self, *allowlist: str) -> PermissionsPolicy: method autoplay (line 238) | def autoplay(self, *allowlist: str) -> PermissionsPolicy: method bluetooth (line 242) | def bluetooth(self, *allowlist: str) -> PermissionsPolicy: method browsing_topics (line 246) | def browsing_topics(self, *allowlist: str) -> PermissionsPolicy: method compute_pressure (line 250) | def compute_pressure(self, *allowlist: str) -> PermissionsPolicy: method cross_origin_isolated (line 254) | def cross_origin_isolated(self, *allowlist: str) -> PermissionsPolicy: method fullscreen (line 258) | def fullscreen(self, *allowlist: str) -> PermissionsPolicy: method gamepad (line 262) | def gamepad(self, *allowlist: str) -> PermissionsPolicy: method geolocation (line 266) | def geolocation(self, *allowlist: str) -> PermissionsPolicy: method gyroscope (line 270) | def gyroscope(self, *allowlist: str) -> PermissionsPolicy: method hid (line 274) | def hid(self, *allowlist: str) -> PermissionsPolicy: method identity_credentials_get (line 278) | def identity_credentials_get(self, *allowlist: str) -> PermissionsPolicy: method idle_detection (line 282) | def idle_detection(self, *allowlist: str) -> PermissionsPolicy: method local_fonts (line 286) | def local_fonts(self, *allowlist: str) -> PermissionsPolicy: method magnetometer (line 290) | def magnetometer(self, *allowlist: str) -> PermissionsPolicy: method microphone (line 294) | def microphone(self, *allowlist: str) -> PermissionsPolicy: method on_device_speech_recognition (line 298) | def on_device_speech_recognition(self, *allowlist: str) -> Permissions... method otp_credentials (line 302) | def otp_credentials(self, *allowlist: str) -> PermissionsPolicy: method publickey_credentials_create (line 306) | def publickey_credentials_create(self, *allowlist: str) -> Permissions... method publickey_credentials_get (line 310) | def publickey_credentials_get(self, *allowlist: str) -> PermissionsPol... method serial (line 314) | def serial(self, *allowlist: str) -> PermissionsPolicy: method speaker_selection (line 318) | def speaker_selection(self, *allowlist: str) -> PermissionsPolicy: method storage_access (line 322) | def storage_access(self, *allowlist: str) -> PermissionsPolicy: method summarizer (line 326) | def summarizer(self, *allowlist: str) -> PermissionsPolicy: method translator (line 330) | def translator(self, *allowlist: str) -> PermissionsPolicy: method language_detector (line 334) | def language_detector(self, *allowlist: str) -> PermissionsPolicy: method usb (line 338) | def usb(self, *allowlist: str) -> PermissionsPolicy: method web_share (line 342) | def web_share(self, *allowlist: str) -> PermissionsPolicy: method window_management (line 346) | def window_management(self, *allowlist: str) -> PermissionsPolicy: method xr_spatial_tracking (line 350) | def xr_spatial_tracking(self, *allowlist: str) -> PermissionsPolicy: method battery (line 358) | def battery(self, *allowlist: str) -> PermissionsPolicy: method camera (line 362) | def camera(self, *allowlist: str) -> PermissionsPolicy: method clipboard_read (line 366) | def clipboard_read(self, *allowlist: str) -> PermissionsPolicy: method clipboard_write (line 370) | def clipboard_write(self, *allowlist: str) -> PermissionsPolicy: method display_capture (line 374) | def display_capture(self, *allowlist: str) -> PermissionsPolicy: method document_domain (line 378) | def document_domain(self, *allowlist: str) -> PermissionsPolicy: method encrypted_media (line 382) | def encrypted_media(self, *allowlist: str) -> PermissionsPolicy: method execution_while_not_rendered (line 386) | def execution_while_not_rendered(self, *allowlist: str) -> Permissions... method execution_while_out_of_viewport (line 390) | def execution_while_out_of_viewport(self, *allowlist: str) -> Permissi... method midi (line 394) | def midi(self, *allowlist: str) -> PermissionsPolicy: method navigation_override (line 398) | def navigation_override(self, *allowlist: str) -> PermissionsPolicy: method payment (line 402) | def payment(self, *allowlist: str) -> PermissionsPolicy: method picture_in_picture (line 406) | def picture_in_picture(self, *allowlist: str) -> PermissionsPolicy: method screen_wake_lock (line 410) | def screen_wake_lock(self, *allowlist: str) -> PermissionsPolicy: method sync_xhr (line 414) | def sync_xhr(self, *allowlist: str) -> PermissionsPolicy: FILE: secure/headers/referrer_policy.py function _split_policies (line 17) | def _split_policies(value: str) -> list[str]: class ReferrerPolicy (line 39) | class ReferrerPolicy(BaseHeader): method header_value (line 59) | def header_value(self) -> str: method _add_token (line 63) | def _add_token(self, token: str) -> None: method add (line 67) | def add(self, value: str) -> ReferrerPolicy: method set (line 86) | def set(self, value: str) -> ReferrerPolicy: method value (line 90) | def value(self, value: str) -> ReferrerPolicy: method custom (line 99) | def custom(self, value: str) -> ReferrerPolicy: method fallback (line 103) | def fallback(self, *policies: str) -> ReferrerPolicy: method clear (line 113) | def clear(self) -> ReferrerPolicy: method no_referrer (line 120) | def no_referrer(self) -> ReferrerPolicy: method no_referrer_when_downgrade (line 124) | def no_referrer_when_downgrade(self) -> ReferrerPolicy: method origin (line 132) | def origin(self) -> ReferrerPolicy: method origin_when_cross_origin (line 136) | def origin_when_cross_origin(self) -> ReferrerPolicy: method same_origin (line 143) | def same_origin(self) -> ReferrerPolicy: method strict_origin (line 150) | def strict_origin(self) -> ReferrerPolicy: method strict_origin_when_cross_origin (line 157) | def strict_origin_when_cross_origin(self) -> ReferrerPolicy: method unsafe_url (line 165) | def unsafe_url(self) -> ReferrerPolicy: FILE: secure/headers/server.py class Server (line 10) | class Server(BaseHeader): method header_value (line 30) | def header_value(self) -> str: method set (line 39) | def set(self, value: str) -> Server: method value (line 55) | def value(self, value: str) -> Server: method clear (line 59) | def clear(self) -> Server: FILE: secure/headers/strict_transport_security.py class StrictTransportSecurity (line 20) | class StrictTransportSecurity(BaseHeader): method header_value (line 53) | def header_value(self) -> str: method _default_max_age_seconds (line 82) | def _default_max_age_seconds(self) -> int: method _ensure_no_newlines (line 94) | def _ensure_no_newlines(value: str) -> str: method clear (line 98) | def clear(self) -> StrictTransportSecurity: method value (line 110) | def value(self, value: str) -> StrictTransportSecurity: method max_age (line 122) | def max_age(self, seconds: int) -> StrictTransportSecurity: method include_subdomains (line 137) | def include_subdomains(self) -> StrictTransportSecurity: method preload (line 143) | def preload(self) -> StrictTransportSecurity: FILE: secure/headers/x_content_type_options.py class XContentTypeOptions (line 18) | class XContentTypeOptions(BaseHeader): method header_value (line 37) | def header_value(self) -> str: method set (line 45) | def set(self, value: str) -> XContentTypeOptions: method value (line 58) | def value(self, value: str) -> XContentTypeOptions: method clear (line 62) | def clear(self) -> XContentTypeOptions: method nosniff (line 72) | def nosniff(self) -> XContentTypeOptions: FILE: secure/headers/x_dns_prefetch_control.py class XDnsPrefetchControl (line 21) | class XDnsPrefetchControl(BaseHeader): method header_value (line 42) | def header_value(self) -> str: method clear (line 46) | def clear(self) -> XDnsPrefetchControl: method set (line 51) | def set(self, value: str) -> XDnsPrefetchControl: method value (line 62) | def value(self, value: str) -> XDnsPrefetchControl: method custom (line 66) | def custom(self, value: str) -> XDnsPrefetchControl: method on (line 70) | def on(self) -> XDnsPrefetchControl: method off (line 79) | def off(self) -> XDnsPrefetchControl: method allow (line 90) | def allow(self) -> XDnsPrefetchControl: method disable (line 94) | def disable(self) -> XDnsPrefetchControl: method _normalize (line 99) | def _normalize(value: str) -> str: FILE: secure/headers/x_frame_options.py class XFrameOptions (line 18) | class XFrameOptions(BaseHeader): method header_value (line 38) | def header_value(self) -> str: method value (line 46) | def value(self, value: str) -> XFrameOptions: method set (line 65) | def set(self, value: str) -> XFrameOptions: method custom (line 69) | def custom(self, value: str) -> XFrameOptions: method clear (line 73) | def clear(self) -> XFrameOptions: method deny (line 82) | def deny(self) -> XFrameOptions: method sameorigin (line 90) | def sameorigin(self) -> XFrameOptions: method allow_from (line 98) | def allow_from(self, origin: str) -> XFrameOptions: FILE: secure/headers/x_permitted_cross_domain_policies.py class XPermittedCrossDomainPolicies (line 37) | class XPermittedCrossDomainPolicies(BaseHeader): method header_value (line 69) | def header_value(self) -> str: method clear (line 75) | def clear(self) -> XPermittedCrossDomainPolicies: method value (line 80) | def value(self, value: str) -> XPermittedCrossDomainPolicies: method custom (line 90) | def custom(self, value: str) -> XPermittedCrossDomainPolicies: method set (line 94) | def set(self, value: str) -> XPermittedCrossDomainPolicies: method policy (line 98) | def policy(self, policy: PermittedCrossDomainPolicy) -> XPermittedCros... method none (line 107) | def none(self) -> XPermittedCrossDomainPolicies: method master_only (line 111) | def master_only(self) -> XPermittedCrossDomainPolicies: method by_content_type (line 115) | def by_content_type(self) -> XPermittedCrossDomainPolicies: method by_ftp_filename (line 119) | def by_ftp_filename(self) -> XPermittedCrossDomainPolicies: method all (line 123) | def all(self) -> XPermittedCrossDomainPolicies: method none_this_response (line 127) | def none_this_response(self) -> XPermittedCrossDomainPolicies: FILE: secure/middleware/asgi.py class ASGIApp (line 19) | class ASGIApp(Protocol): method __call__ (line 20) | def __call__(self, scope: Scope, receive: Receive, send: Send) -> Awai... function _normalize_header_name (line 31) | def _normalize_header_name(name: str) -> str: function _normalize_header_name_bytes (line 36) | def _normalize_header_name_bytes(name: bytes) -> bytes: function _encode_header_name (line 41) | def _encode_header_name(name: str) -> bytes: function _encode_header_value (line 51) | def _encode_header_value(value: str) -> bytes: class SecureASGIMiddleware (line 67) | class SecureASGIMiddleware: method __init__ (line 100) | def __init__( method __call__ (line 117) | async def __call__(self, scope: Scope, receive: Receive, send: Send) -... FILE: secure/middleware/wsgi.py function _normalize_header_name (line 39) | def _normalize_header_name(name: str) -> str: class SecureWSGIMiddleware (line 49) | class SecureWSGIMiddleware: method __init__ (line 83) | def __init__( method __call__ (line 96) | def __call__(self, environ: WSGIEnvironment, start_response: StartResp... FILE: secure/secure.py class Secure (line 42) | class Secure: method __init__ (line 70) | def __init__( # noqa: PLR0913 method headers_list (line 147) | def headers_list(self) -> list[BaseHeader]: method headers_list (line 152) | def headers_list(self, headers: Iterable[BaseHeader]) -> None: method _discard_normalized_headers (line 155) | def _discard_normalized_headers(self) -> None: method _normalized_headers_for (line 159) | def _normalized_headers_for( method with_default_headers (line 173) | def with_default_headers(cls) -> Secure: method from_preset (line 190) | def from_preset(cls, preset: Preset) -> Secure: method __str__ (line 214) | def __str__(self) -> str: method __repr__ (line 218) | def __repr__(self) -> str: method validate_and_normalize_headers (line 226) | def validate_and_normalize_headers( method deduplicate_headers (line 282) | def deduplicate_headers( method allowlist_headers (line 330) | def allowlist_headers( method header_items (line 383) | def header_items(self) -> HeaderItems: method _resolved_header_items (line 398) | def _resolved_header_items(self) -> HeaderItems: method headers (line 409) | def headers(self) -> Mapping[str, str]: method set_headers (line 441) | def set_headers(self, response: ResponseProtocol) -> None: method set_headers_async (line 473) | async def set_headers_async(self, response: ResponseProtocol) -> None: FILE: tests/headers/test_cache_control.py class TestCacheControl (line 6) | class TestCacheControl(unittest.TestCase): method test_default_cache_control (line 7) | def test_default_cache_control(self): method test_set_no_cache (line 12) | def test_set_no_cache(self): method test_set_max_age (line 17) | def test_set_max_age(self): method test_clear_cache_control (line 22) | def test_clear_cache_control(self): method test_multiple_directives (line 27) | def test_multiple_directives(self): FILE: tests/headers/test_content_security_policy.py class TestContentSecurityPolicy (line 7) | class TestContentSecurityPolicy(unittest.TestCase): method test_default_csp (line 8) | def test_default_csp(self): method test_custom_policy (line 16) | def test_custom_policy(self): method test_add_script_src (line 21) | def test_add_script_src(self): method test_clear_policy (line 26) | def test_clear_policy(self): FILE: tests/headers/test_cross_origin_embedder_policy.py class TestCrossOriginEmbedderPolicy (line 7) | class TestCrossOriginEmbedderPolicy(unittest.TestCase): method test_default_value (line 8) | def test_default_value(self) -> None: method test_builder_helpers (line 13) | def test_builder_helpers(self) -> None: method test_value_accepts_custom (line 19) | def test_value_accepts_custom(self) -> None: method test_invalid_inputs_raise (line 24) | def test_invalid_inputs_raise(self) -> None: method test_deterministic_output (line 29) | def test_deterministic_output(self) -> None: FILE: tests/headers/test_cross_origin_opener_policy.py class TestCrossOriginOpenerPolicy (line 6) | class TestCrossOriginOpenerPolicy(unittest.TestCase): method test_default_coop (line 7) | def test_default_coop(self): method test_set_custom_policy (line 12) | def test_set_custom_policy(self): method test_same_origin (line 17) | def test_same_origin(self): method test_same_origin_allow_popups (line 22) | def test_same_origin_allow_popups(self): method test_unsafe_none (line 27) | def test_unsafe_none(self): method test_clear_policy (line 32) | def test_clear_policy(self): FILE: tests/headers/test_custom_header.py class TestCustomHeader (line 6) | class TestCustomHeader(unittest.TestCase): method test_custom_header_initialization (line 7) | def test_custom_header_initialization(self): method test_set_custom_header_value (line 13) | def test_set_custom_header_value(self): method test_method_chaining (line 19) | def test_method_chaining(self): FILE: tests/headers/test_header_contracts_extended.py class HeaderSpec (line 26) | class HeaderSpec: class TestHeaderContracts (line 38) | class TestHeaderContracts(unittest.TestCase): method test_default_values (line 225) | def test_default_values(self) -> None: method test_header_names (line 231) | def test_header_names(self) -> None: method test_clear_resets_default (line 237) | def test_clear_resets_default(self) -> None: method test_builder_helpers (line 246) | def test_builder_helpers(self) -> None: method test_invalid_inputs_raise (line 252) | def test_invalid_inputs_raise(self) -> None: method test_deterministic_output (line 257) | def test_deterministic_output(self) -> None: FILE: tests/headers/test_permissions_policy.py class TestPermissionsPolicy (line 6) | class TestPermissionsPolicy(unittest.TestCase): method test_default_permissions_policy (line 7) | def test_default_permissions_policy(self): method test_custom_permissions_policy (line 15) | def test_custom_permissions_policy(self): method test_clear_permissions_policy (line 20) | def test_clear_permissions_policy(self): method test_add_directive (line 28) | def test_add_directive(self): FILE: tests/headers/test_referrer_policy.py class TestReferrerPolicy (line 6) | class TestReferrerPolicy(unittest.TestCase): method test_default_referrer_policy (line 7) | def test_default_referrer_policy(self): method test_set_custom_policy (line 12) | def test_set_custom_policy(self): method test_no_referrer (line 17) | def test_no_referrer(self): method test_no_referrer_when_downgrade (line 22) | def test_no_referrer_when_downgrade(self): method test_origin (line 27) | def test_origin(self): method test_origin_when_cross_origin (line 32) | def test_origin_when_cross_origin(self): method test_same_origin (line 37) | def test_same_origin(self): method test_strict_origin (line 42) | def test_strict_origin(self): method test_strict_origin_when_cross_origin (line 47) | def test_strict_origin_when_cross_origin(self): method test_unsafe_url (line 52) | def test_unsafe_url(self): method test_clear_policy (line 57) | def test_clear_policy(self): FILE: tests/headers/test_server.py class TestServerHeader (line 6) | class TestServerHeader(unittest.TestCase): method test_default_server (line 7) | def test_default_server(self): method test_set_custom_server (line 12) | def test_set_custom_server(self): method test_clear_server (line 17) | def test_clear_server(self): FILE: tests/headers/test_strict_transport_security.py class TestStrictTransportSecurity (line 6) | class TestStrictTransportSecurity(unittest.TestCase): method test_default_hsts (line 7) | def test_default_hsts(self): method test_custom_max_age (line 13) | def test_custom_max_age(self): method test_preload (line 18) | def test_preload(self): method test_include_subdomains (line 23) | def test_include_subdomains(self): FILE: tests/headers/test_x_content_type_options.py class TestXContentTypeOptions (line 6) | class TestXContentTypeOptions(unittest.TestCase): method test_default_x_content_type_options (line 7) | def test_default_x_content_type_options(self): method test_set_custom_value (line 12) | def test_set_custom_value(self): method test_nosniff (line 17) | def test_nosniff(self): method test_clear (line 22) | def test_clear(self): FILE: tests/headers/test_x_frame_options.py class TestXFrameOptions (line 6) | class TestXFrameOptions(unittest.TestCase): method test_default_x_frame_options (line 7) | def test_default_x_frame_options(self): method test_set_deny (line 12) | def test_set_deny(self): method test_set_sameorigin (line 17) | def test_set_sameorigin(self): FILE: tests/middleware/test_middleware.py function _find_header_values (line 8) | def _find_header_values(headers: list[tuple[str, str]], name: str) -> li... class _CapturedWSGI (line 13) | class _CapturedWSGI(TypedDict): function _run_wsgi_with_middleware (line 20) | def _run_wsgi_with_middleware(middleware) -> _CapturedWSGI: function test_wsgi_overwrites_existing_header (line 43) | def test_wsgi_overwrites_existing_header(): function test_wsgi_multi_ok_appends_existing_header (line 58) | def test_wsgi_multi_ok_appends_existing_header(): function test_wsgi_preserves_status_and_extra_headers (line 73) | def test_wsgi_preserves_status_and_extra_headers(): function _headers_by_name_bytes (line 88) | def _headers_by_name_bytes(headers: list[tuple[bytes, bytes]], name: byt... function _http_app (line 93) | def _http_app(response_headers: list[tuple[bytes, bytes]]): class _HTTPResponseStart (line 107) | class _HTTPResponseStart(TypedDict): function _run_asgi (line 113) | async def _run_asgi(scope: dict[str, Any], app) -> list[dict[str, Any]]: function test_asgi_overwrites_numeric_headers (line 126) | def test_asgi_overwrites_numeric_headers(): function test_asgi_multi_ok_appends_default_csp (line 149) | def test_asgi_multi_ok_appends_default_csp(): function test_asgi_ignores_non_http_scopes (line 166) | def test_asgi_ignores_non_http_scopes(): function test_asgi_multi_ok_custom_header (line 176) | def test_asgi_multi_ok_custom_header(): FILE: tests/middleware/test_secure_protocols.py class HeadersOnlyResponse (line 11) | class HeadersOnlyResponse: method __init__ (line 12) | def __init__(self) -> None: class SetHeaderResponse (line 16) | class SetHeaderResponse: method __init__ (line 17) | def __init__(self) -> None: method set_header (line 20) | def set_header(self, key: str, value: str) -> None: class AsyncSetHeaderResponse (line 24) | class AsyncSetHeaderResponse: method __init__ (line 25) | def __init__(self) -> None: method set_header (line 28) | async def set_header(self, key: str, value: str) -> None: class AsyncOnlySetHeader (line 32) | class AsyncOnlySetHeader: method set_header (line 33) | async def set_header(self, key: str, value: str) -> None: class TestSetHeaders (line 37) | class TestSetHeaders(unittest.TestCase): method test_headers_mapping_path_applies_headers (line 38) | def test_headers_mapping_path_applies_headers(self) -> None: method test_set_headers_prefers_set_header_method (line 46) | def test_set_headers_prefers_set_header_method(self) -> None: method test_set_headers_async_accepts_async_set_header (line 54) | def test_set_headers_async_accepts_async_set_header(self) -> None: method test_set_headers_rejects_async_method_in_sync_context (line 62) | def test_set_headers_rejects_async_method_in_sync_context(self) -> None: FILE: tests/secure_tests/test_exports.py class TestExportSurface (line 8) | class TestExportSurface(unittest.TestCase): method test_secure_package_exports (line 9) | def test_secure_package_exports(self) -> None: method test_headers_package_exports (line 37) | def test_headers_package_exports(self) -> None: method test_middleware_package_exports (line 61) | def test_middleware_package_exports(self) -> None: FILE: tests/secure_tests/test_headers.py class TestHeaderConsistency (line 22) | class TestHeaderConsistency(unittest.TestCase): method test_value_methods_reject_crlf (line 23) | def test_value_methods_reject_crlf(self) -> None: method test_clear_restores_default_values (line 47) | def test_clear_restores_default_values(self) -> None: method test_cache_control_canonical_order (line 75) | def test_cache_control_canonical_order(self) -> None: method test_content_security_policy_values_deduplicate (line 80) | def test_content_security_policy_values_deduplicate(self) -> None: method test_permissions_policy_wildcard_must_be_alone (line 85) | def test_permissions_policy_wildcard_must_be_alone(self) -> None: method test_referrer_policy_add_is_idempotent (line 90) | def test_referrer_policy_add_is_idempotent(self) -> None: method test_xdns_prefetch_control_normalizes_values (line 94) | def test_xdns_prefetch_control_normalizes_values(self) -> None: method test_x_permitted_policy_rejects_unknown (line 102) | def test_x_permitted_policy_rejects_unknown(self) -> None: FILE: tests/secure_tests/test_internal_helpers.py class _AsyncHeadersMapping (line 12) | class _AsyncHeadersMapping: method __init__ (line 13) | def __init__(self) -> None: method __setitem__ (line 16) | async def __setitem__(self, key: str, value: str) -> None: class _AsyncHeadersResponse (line 20) | class _AsyncHeadersResponse: method __init__ (line 21) | def __init__(self) -> None: class TestInternalHelpers (line 25) | class TestInternalHelpers(unittest.TestCase): method test_normalize_header_items_warns_and_drops_invalid_names (line 26) | def test_normalize_header_items_warns_and_drops_invalid_names(self) ->... method test_normalize_header_items_preserves_obs_text_when_allowed (line 38) | def test_normalize_header_items_preserves_obs_text_when_allowed(self) ... method test_allowlist_header_objects_warn_keeps_unexpected_headers (line 46) | def test_allowlist_header_objects_warn_keeps_unexpected_headers(self) ... method test_deduplicate_header_objects_preserves_multi_ok_order (line 60) | def test_deduplicate_header_objects_preserves_multi_ok_order(self) -> ... method test_set_headers_async_helper_awaits_async_headers_mapping (line 81) | def test_set_headers_async_helper_awaits_async_headers_mapping(self) -... FILE: tests/secure_tests/test_secure.py class MockResponse (line 22) | class MockResponse: method __init__ (line 23) | def __init__(self) -> None: method set_header (line 26) | def set_header(self, key: str, value: str) -> None: class MockResponseWithSetHeader (line 31) | class MockResponseWithSetHeader: method __init__ (line 32) | def __init__(self) -> None: method set_header (line 36) | def set_header(self, key: str, value: str) -> None: class MockResponseAsyncSetHeader (line 41) | class MockResponseAsyncSetHeader: method __init__ (line 42) | def __init__(self) -> None: method set_header (line 46) | async def set_header(self, key: str, value: str) -> None: class MockResponseNoHeaders (line 51) | class MockResponseNoHeaders: class _AsyncHeadersMapping (line 55) | class _AsyncHeadersMapping: method __init__ (line 56) | def __init__(self) -> None: method __setitem__ (line 59) | async def __setitem__(self, key: str, value: str) -> None: class MockAsyncHeadersResponse (line 63) | class MockAsyncHeadersResponse: method __init__ (line 64) | def __init__(self) -> None: method set_header (line 67) | async def set_header(self, key: str, value: str) -> None: class MockResponseRaiseSetHeader (line 72) | class MockResponseRaiseSetHeader: method set_header (line 73) | def set_header(self, key: str, value: str) -> None: class MockResponseAwaitableSetHeader (line 77) | class MockResponseAwaitableSetHeader: method __init__ (line 78) | def __init__(self) -> None: method set_header (line 81) | def set_header(self, key: str, value: str) -> Awaitable[None]: function _expected_basic_csp_value (line 95) | def _expected_basic_csp_value() -> str: class TestSecure (line 113) | class TestSecure(unittest.TestCase): method setUp (line 114) | def setUp(self) -> None: method test_with_default_headers (line 123) | def test_with_default_headers(self) -> None: method test_with_default_headers_matches_balanced_preset (line 174) | def test_with_default_headers_matches_balanced_preset(self) -> None: method test_balanced_preset_omits_cache_control (line 180) | def test_balanced_preset_omits_cache_control(self) -> None: method test_from_preset_basic (line 186) | def test_from_preset_basic(self) -> None: method test_from_preset_strict (line 240) | def test_from_preset_strict(self) -> None: method test_custom_headers (line 291) | def test_custom_headers(self) -> None: method test_async_set_headers (line 311) | def test_async_set_headers(self) -> None: method test_set_headers_with_set_header_method (line 340) | def test_set_headers_with_set_header_method(self) -> None: method test_set_headers_with_headers_dict (line 350) | def test_set_headers_with_headers_dict(self) -> None: method test_set_headers_async_with_async_set_header (line 358) | def test_set_headers_async_with_async_set_header(self) -> None: method test_set_headers_async_with_headers_dict (line 372) | def test_set_headers_async_with_headers_dict(self) -> None: method test_validate_and_normalize_headers_drops_invalid_entries (line 380) | def test_validate_and_normalize_headers_drops_invalid_entries(self) ->... method test_validate_and_normalize_headers_applies_normalized_values (line 396) | def test_validate_and_normalize_headers_applies_normalized_values(self... method test_set_headers_missing_interface (line 415) | def test_set_headers_missing_interface(self) -> None: method test_set_headers_with_async_set_header_in_sync_context (line 428) | def test_set_headers_with_async_set_header_in_sync_context(self) -> None: method test_set_headers_overwrites_existing_headers (line 434) | def test_set_headers_overwrites_existing_headers(self) -> None: method test_custom_header_inclusion (line 446) | def test_custom_header_inclusion(self) -> None: method test_headers_property (line 458) | def test_headers_property(self) -> None: method test_str_representation (line 466) | def test_str_representation(self) -> None: method test_repr_representation (line 475) | def test_repr_representation(self) -> None: method test_str_representation_uses_normalized_values (line 483) | def test_str_representation_uses_normalized_values(self) -> None: method test_package_exports_header_constants (line 493) | def test_package_exports_header_constants(self) -> None: method test_invalid_preset (line 499) | def test_invalid_preset(self) -> None: method test_empty_secure_instance (line 506) | def test_empty_secure_instance(self) -> None: method test_multiple_custom_headers (line 514) | def test_multiple_custom_headers(self) -> None: method test_custom_strict_transport_security (line 531) | def test_custom_strict_transport_security(self) -> None: method test_setting_headers_on_response_with_both_headers_and_set_header (line 545) | def test_setting_headers_on_response_with_both_headers_and_set_header(... method test_header_order (line 572) | def test_header_order(self) -> None: method test_set_headers_async_with_sync_set_header (line 584) | def test_set_headers_async_with_sync_set_header(self) -> None: method test_set_headers_with_no_headers_or_set_header (line 597) | def test_set_headers_with_no_headers_or_set_header(self) -> None: method test_headers_list_property (line 610) | def test_headers_list_property(self) -> None: method test_headers_property_with_no_headers (line 623) | def test_headers_property_with_no_headers(self) -> None: method test_headers_property_tracks_builder_mutation_after_access (line 628) | def test_headers_property_tracks_builder_mutation_after_access(self) -... method test_allowlist_headers_drop_unexpected (line 639) | def test_allowlist_headers_drop_unexpected(self) -> None: method test_allowlist_headers_raises_on_unexpected (line 647) | def test_allowlist_headers_raises_on_unexpected(self) -> None: method test_allowlist_accepts_default_balanced_headers (line 654) | def test_allowlist_accepts_default_balanced_headers(self) -> None: method test_allowlist_respects_allow_x_prefixed (line 661) | def test_allowlist_respects_allow_x_prefixed(self) -> None: method test_deduplicate_concat_merges_cache_control (line 668) | def test_deduplicate_concat_merges_cache_control(self) -> None: method test_deduplicate_headers_raise_on_duplicate (line 683) | def test_deduplicate_headers_raise_on_duplicate(self) -> None: method test_validate_and_normalize_headers_strict_rejects_crlf (line 695) | def test_validate_and_normalize_headers_strict_rejects_crlf(self) -> N... method test_validate_and_normalize_headers_is_cleared_by_headers_list_mutation (line 706) | def test_validate_and_normalize_headers_is_cleared_by_headers_list_mut... method test_validate_and_normalize_headers_is_cleared_by_builder_mutation (line 721) | def test_validate_and_normalize_headers_is_cleared_by_builder_mutation... method test_headers_property_raises_on_duplicates (line 731) | def test_headers_property_raises_on_duplicates(self) -> None: method test_set_headers_wraps_setter_errors (line 743) | def test_set_headers_wraps_setter_errors(self) -> None: method test_set_headers_async_wraps_setter_errors (line 751) | def test_set_headers_async_wraps_setter_errors(self) -> None: method test_set_headers_runtime_error_on_async_setter (line 762) | def test_set_headers_runtime_error_on_async_setter(self) -> None: method test_set_headers_async_handles_async_headers_mapping (line 770) | def test_set_headers_async_handles_async_headers_mapping(self) -> None: