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 .webmanifest static files. #7664

Closed
wants to merge 1 commit into from

Conversation

scottsauber
Copy link
Contributor

Add support for static files with .webmanifest extensions which are commonly used for Progressive Web Apps - https://developer.mozilla.org/en-US/docs/Web/Manifest

Addresses #2442

@Tratcher Tratcher removed their request for review February 17, 2019 04:27
@Tratcher Tratcher assigned Tratcher and shirhatti and unassigned Tratcher Feb 17, 2019
@scottsauber
Copy link
Contributor Author

@shirhatti - anything else you need from me on this?

@Tratcher
Copy link
Member

FYI: https://github.com/aspnet/AspNetCore/blob/a9d3f9c22b16e16f017a36a6e8ae72902c2a698d/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs#L14-L17

@scottsauber
Copy link
Contributor Author

@Tratcher - ok so do you want me to just close this PR? No sense in leaving it open if there is no desire to merge it.

@Tratcher Tratcher closed this Apr 23, 2019
@huysentruitw
Copy link
Contributor

huysentruitw commented Oct 16, 2019

@Tratcher @shirhatti this seems to be a problem for us when we enable a service worker in an Angular 8.2. Currently we need to use this work-around:

FileExtensionContentTypeProvider provider = new FileExtensionContentTypeProvider();
provider.Mappings[".webmanifest"] = "application/manifest+json";

app.UseStaticFiles(new StaticFileOptions
{
    ContentTypeProvider = provider,
});

Since more and more PWA's are being created, it seems a very logical step forward to be able to host this content type by default. It took us some time to figure this out.

For more information about this type, see https://www.w3.org/TR/appmanifest/

Thanks for reconsidering this.

@stephenlautier
Copy link
Contributor

But why not support it if its still being used? Unless its obsolete, which doesnt seems like it - it will make our lives much easier by this small change

@huysentruitw
Copy link
Contributor

Setting up a new project and here we are again... What do we miss to have this type in the framework? Do we need to create an official project template for PWA's?

When starting from the ASP.NET Core + Angular template, converting it to a PWA is as simple as executing ng add @angular/pwa --project ClientApp and then you're up for hours of googling why it doesn't work in your ASP.NET Core host until you come up at this issue... We can do better, right?

image

@amcasey amcasey added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware label Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants