Skip to main content

is_javascript_mime_type

Function is_javascript_mime_type 

Source
pub fn is_javascript_mime_type(mime: &str) -> bool
Expand description

Check if a MIME type is a valid JavaScript MIME type for Worker scripts.

Per DF-WK-2: “JS MIME 校验” — the response Content-Type must be a JavaScript MIME type. This function performs a case-insensitive match against the WHATWG JavaScript MIME type list.

@trace REQ-BRW-004 [entity:Worker] [DF-WK-2]