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

Allow content-type "application/json" #13

Closed

Conversation

kfrederix
Copy link
Contributor

@kfrederix kfrederix commented May 3, 2024

Hello, thank you for this repo!

I would like to propose a small change which makes the check on content-type less strict.
Even though "application/importmap+json" is maybe more correct for importmaps, I don't see a really good reason why we couldn't allow "application/json" as well?

This PR introduces the changes to accept both these content-types. What do you think about it?

Issue: #11

@joeldenning
Copy link
Member

The import-maps specification specifically forbids the application/json MIME type because of security reasons. See the following links:

https://github.com/WICG/import-maps?tab=readme-ov-file#installation
WICG/import-maps#105

@joeldenning joeldenning closed this Oct 2, 2024
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 this pull request may close these issues.

2 participants