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

MIME Types missing #109

Closed
sultansoy opened this issue Aug 16, 2018 · 2 comments
Closed

MIME Types missing #109

sultansoy opened this issue Aug 16, 2018 · 2 comments

Comments

@sultansoy
Copy link

sultansoy commented Aug 16, 2018

Hi. There're many types not included in your MimeUtils.
For example woff and woff2 for fonts. So I can't use fonts as static resources on web presentation server.
I fix this problem with reflection:
`try {
Field field = MimeUtils.class.getDeclaredField("MIME_TYPES");

        field.setAccessible(true);

        HashMap<String, String> map = (HashMap<String, String>) field.get(null);

        map.put("woff2", "application/font-woff2");

        map.put("woff", "application/font-woff");

    } catch (NoSuchFieldException | IllegalAccessException e) {

        e.printStackTrace();

    }`

But I think it's not good practice. I will create pull request with added fields, but also I want to add static method, which will recieve 2 arguments, verify mime type and put it in the map

dxa-team pushed a commit that referenced this issue Aug 22, 2018
…3138 to develop

* commit '6bd4e4bb80fd3add5bb3a4764fc876076a2cc3d7':
  TSI-3138 reverted back CSRF enabling
  TSI-3138 reverted back name of module (changed accidentally)
  TSI-3138 removed unused import
  TSI-3138 reverted back changes as it was not necessary (that changes were made due to invalid configuration)
  TSI-3138 added claims to pass through conditions
  TSI-3138 adding default key name
  TSI-3138 added profile to distingish DefaulContentProvider and IshContentProvider
  TSI-3138 added version for module
  TSI-3138 added profile for tridion docs module
  TSI-3299 Fixed ajax request data
  TSI-3299 added necessary fields for API
@rpannekoek rpannekoek changed the title MimeUtils MIME Types missing Dec 18, 2018
@rpannekoek rpannekoek added this to the v2.2 milestone Dec 18, 2018
@rpannekoek
Copy link
Contributor

Internal Issue ID (for tracking purposes): CRQ-12809

@rpannekoek
Copy link
Contributor

Incorporated in DXA 2.2

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

No branches or pull requests

2 participants