Skip to content

Instantly share code, notes, and snippets.

@DavidDeSloovere
Created May 12, 2022 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidDeSloovere/fa4d0b72cc5b0937a0421146795b72a7 to your computer and use it in GitHub Desktop.
Save DavidDeSloovere/fa4d0b72cc5b0937a0421146795b72a7 to your computer and use it in GitHub Desktop.
ASP.NET Core - Only use compression for some endpoints
app.UseWhen(
context => context.Request.Path.StartsWithSegments("/api"),
builder => builder.UseResponseCompression());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment