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

Add support for .webmanifest file extension #2442

Closed
aspnet-hello opened this issue Jan 1, 2018 · 14 comments · Fixed by #19661
Closed

Add support for .webmanifest file extension #2442

aspnet-hello opened this issue Jan 1, 2018 · 14 comments · Fixed by #19661
Assignees
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-static-files

Comments

@aspnet-hello
Copy link

From @madskristensen on Friday, October 27, 2017 3:57:16 PM

This is used in Progressive Web Apps (PWAs) for the manifest JSON file.

The content type should be application/manifest+json

Copied from original issue: aspnet/StaticFiles#219

@aspnet-hello
Copy link
Author

From @muratg on Friday, October 27, 2017 4:00:02 PM

cc @glennc

@aspnet-hello
Copy link
Author

From @Tratcher on Friday, October 27, 2017 4:13:03 PM

Is there a spec reference?

@aspnet-hello
Copy link
Author

From @madskristensen on Friday, October 27, 2017 4:24:22 PM

https://w3c.github.io/manifest/#media-type-registration shows the content type application/manifest+json and a little further down in the same chapter the .webmanifest file extension.

Sorry, I should have added this when I opened the bug

@aspnet-hello
Copy link
Author

From @RehanSaeed on Monday, October 30, 2017 2:59:39 AM

Just saw this issue, I already raised aspnet/StaticFiles#221 to fix this.

@muratg
Copy link
Contributor

muratg commented Mar 7, 2018

Backlogging this.

cc @glennc FYI.

@willdean
Copy link

willdean commented Mar 4, 2020

There's an additional imperative for this now, because the usual work-around of adding the required mapping to a StaticFilesOptions object and passing it to UseStaticFiles then prevents (for reasons I don't properly understand) Blazor Server from initialising its static file service properly. So you can serve static .webmanifest files, or you can have Blazor Server, but you can't easily do both.

This seems to be because if you pass StaticFileOptions to UseStaticFiles, the framework stops calling ConfigureStaticFilesOptions, which then means that Blazor Server doesn't work (because blazor.server.js isn't served).

Could we please just have the mapping entry? Someone even filed a one-line PR for this over two years ago #221 - if just seemed to get lost somehow.

@Tratcher
Copy link
Member

Tratcher commented Mar 4, 2020

@danroth27 @anurse We're getting more hits on this. See the linked PR #7664.

@analogrelay
Copy link
Contributor

I'd support reviving this. There's an RFC defining this mapping (file extension -> mime type) right?

@Tratcher
Copy link
Member

Tratcher commented Mar 4, 2020

@danroth27
Copy link
Member

@SteveSandersonMS How are we handling the manifest media type currently in the new PWA support for Blazor WebAssembly?

@SteveSandersonMS
Copy link
Member

@danroth27 We call it manifest.json so it uses the default JSON media type. We can switch it to be a .webmanifest file in the future when ASP.NET Core understands that by default.

In the short term it should make no difference: https://stackoverflow.com/questions/52129281/manifest-json-vs-manifest-webmanifest

@madskristensen
Copy link
Contributor

Previously closed dupes: #3613 and #2440

@analogrelay analogrelay removed this from the Backlog milestone Mar 5, 2020
@analogrelay analogrelay self-assigned this Mar 6, 2020
@analogrelay analogrelay added this to the 5.0.0-preview3 milestone Mar 6, 2020
@analogrelay
Copy link
Contributor

analogrelay commented Mar 6, 2020

There's an additional imperative for this now, because the usual work-around of adding the required mapping to a StaticFilesOptions object and passing it to UseStaticFiles then prevents (for reasons I don't properly understand) Blazor Server from initialising its static file service properly.

(Emphasis added)

This seems like a Blazor problem worth investigating (@SteveSandersonMS @danroth27 ).

I'm sending a PR to add the content type mapping.

@willdean
Copy link

willdean commented Mar 6, 2020

@anurse Please see #19578 which I filed after adding my comment here.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2020
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-static-files
Projects
None yet
Development

Successfully merging a pull request may close this issue.