Skip to content

Add application/manifest+json ( .webmanifest) #2440

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

Closed
aspnet-hello opened this issue Jan 1, 2018 · 1 comment
Closed

Add application/manifest+json ( .webmanifest) #2440

aspnet-hello opened this issue Jan 1, 2018 · 1 comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares feature-static-files

Comments

@aspnet-hello
Copy link

From @RehanSaeed on Monday, October 30, 2017 2:58:49 AM

Added support fot the .webmanifest file extension which returns application/manifest+json.

See sonarwhal documentation and W3C for reference.

Copied from original issue: aspnet/StaticFiles#221

@rickyruiz
Copy link

Any news on when is this PR going live?


If anyone is stuck with this, you can create a custom content type provider like so:

  public class PwaContentTypeProvider : FileExtensionContentTypeProvider
  {
    public PwaContentTypeProvider()
    {
      Mappings.Add(".webmanifest", "application/manifest+json");
    }
  }

In Startup.cs:

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

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
@amcasey amcasey added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label 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 middlewares feature-static-files
Projects
None yet
Development

No branches or pull requests

3 participants