Skip to content

Support arbitrary file extensions #481

@Marc-Andre-Rivet

Description

@Marc-Andre-Rivet

Dash components are packaged with webpack and it's natural to end up having standalone files in webpack bundled projects. For example, static images, fonts or icons would typically not be bundled inside the main bundle.js when they exceed a certain size.

This issue relates to
#96
#480

Using a combination of mimetypes as suggested here (#478 (comment)), explicit overrides (e.g. .map files) and defaulting to no content type (or application/octet-stream) (#478 (comment)) would allow Dash to expose arbitrary files in a predictable fashion, while providing default behavior for unknowns (some clients will be able to figure out the type when defaulted, some will not)

For known types (mimetypes, map) we could add this additional header
X-Content-Type-Options=nosniff
to prevent the browser from trying to figure out the content type by itself (the browser can sometimes use this to override the default -- content-type)

Additional possible improvement: #480 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions