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
-
NoSniffBlocks a request if the request destination is of type
styleand the MIME type is nottext/css, or of typescriptand 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.