plume/content_type_options

X-Content-Type-Options

This response header indicates that the MIME types advertised in the Content-Type headers should be respected and not changed. It is a way to opt out of MIME type sniffing, reducing exposure to drive-by download attacks and the serving of user-uploaded content with an unexpected MIME type.

See the MDN docs.

Types

An X-Content-Type-Options header value.

pub type ContentTypeOptions {
  NoSniff
}

Constructors

  • NoSniff

    Blocks a request if the request destination is of type style and the MIME type is not text/css, or of type script and the MIME type is not a JavaScript MIME type. Plume default.

Values

pub fn to_string(value: ContentTypeOptions) -> String

Encode as the X-Content-Type-Options header value.

Search Document