Project

General

Profile

Actions

Support #13173

open

Add MIME Type *.mjs / JavaScript module

Added by Stefan Bn 17 days ago. Updated 12 days ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
10/31/2024
Due date:
% Done:

0%

Estimated time:

Description

Please add extension *.mjs to MIME types being served as text/javascript.

The lack of this MIME type currently prevents from using the online PDF-Viewer pdf.js (from versions 4++). See
https://github.com/mozilla/pdf.js/issues/17296#issuecomment-1818335844

Maybe it would be useful to add a general way of adding custom MIME types, either by a specific method in WServer, eg. addMimeType(std::string ext, std::string mimeType) or a section for this in wt_config.xml?

Thank you very much!
Stefan


Related issues 2 (2 open0 closed)

Related to Feature #10903: Add more MIME types to src/http/MimeTypes.C?ReviewMatthias Van Ceulebroeck09/01/2022

Actions
Related to Improvements #13188: Allow for additional MIME types to be definedNew11/06/2024

Actions
Actions #1

Updated by Matthias Van Ceulebroeck 12 days ago

  • Tracker changed from Feature to Support
  • Status changed from New to Resolved
  • Assignee set to Matthias Van Ceulebroeck
  • Target version set to 4.11.2

Hello Stefan,

Wt is indeed lacking a couple more recent or at least relevant MIME types. We have #10903 pending, that is going to add a couple more of them (including mjs).
I agree that it should be easier to configure, where the wt_config.xml seems like the best place. However, this file is already very big, and certain elements lack documentation. While it should be exposed, I'm hesitant to "pollute" this file any further.

I will bump the related ticket in priority (as we've had JS Module questions before), and consider something for configuration for the future.
As this relates to the linked ticket, I will mark this as a "Support" ticket that has been "Resolved".

Best,
Matthias

Actions #2

Updated by Matthias Van Ceulebroeck 12 days ago

  • Related to Feature #10903: Add more MIME types to src/http/MimeTypes.C? added
Actions #3

Updated by Matthias Van Ceulebroeck 11 days ago

Actions

Also available in: Atom PDF