module StaticAssets::MimeTypes

Overview

MIME type resolver with deterministic modern web defaults (.mjs, .woff2, .avif, .webp, .wasm, .svg, .map).

Defined in:

static_assets/mime_types.cr

Constant Summary

MODERN_TYPES = {".mjs" => "text/javascript; charset=utf-8", ".js" => "text/javascript; charset=utf-8", ".css" => "text/css; charset=utf-8", ".html" => "text/html; charset=utf-8", ".htm" => "text/html; charset=utf-8", ".json" => "application/json", ".map" => "application/json", ".webmanifest" => "application/manifest+json", ".svg" => "image/svg+xml", ".woff2" => "font/woff2", ".woff" => "font/woff", ".avif" => "image/avif", ".webp" => "image/webp", ".png" => "image/png", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".gif" => "image/gif", ".ico" => "image/x-icon", ".wasm" => "application/wasm", ".txt" => "text/plain; charset=utf-8", ".xml" => "application/xml"}

Class Method Summary

Class Method Detail

def self.for_path(path : String) : String #

[View source]