aloji / ResponseEtag

ASP.NET Core ETag middleware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

ASP.NET Core - HTTP ETag Middleware

By Mozilla

The ETag HTTP response header is an identifier for a specific version of a resource. It allows caches to be more efficient, and saves bandwidth, as a web server does not need to send a full response if the content has not changed.

Configuration

The following code shows how to enable the Response ETag Middleware

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddResponseETag();
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app.UseResponseETag();
    }
}

About

ASP.NET Core ETag middleware


Languages

Language:C# 100.0%