Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support arbitrary file extensions #481

Closed
Marc-Andre-Rivet opened this issue Dec 6, 2018 · 0 comments · Fixed by #1078
Closed

Support arbitrary file extensions #481

Marc-Andre-Rivet opened this issue Dec 6, 2018 · 0 comments · Fixed by #1078
Assignees
Milestone

Comments

@Marc-Andre-Rivet
Copy link
Contributor

Marc-Andre-Rivet commented Dec 6, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants