aspnet / StaticFiles

[Archived] Middleware for handling requests for file system resources including files and directories. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
114 stars 72 forks source link

ResponseCompression is ignored under IIS #194

Closed oliverjanik closed 7 years ago

oliverjanik commented 7 years ago

Reposted from #119:

This is an issue, I just ran into this today. Please reopen. It took me a while to debug.

Here are my observations:

Asp.Net Core gzips css and js bundles without any configuration I've added ResponseCompression to also gzip static SVGs in my project: services.AddResponseCompression(o => { o.MimeTypes = new[] { "image/svg+xml" }; });

When I run this from with VS (IIS Express) I get my SVG's gzipped

When I deploy and this runs under Win 2012 R2 under IIS which has static and dynamic compression OFF nothing is GZipped (not even the bundles)

My conclusion is that IIS acting as a proxy decompresses incoming requests and serves them plain.

Blank rule for dynamic compression ON is NOT an option because of CRIME.

Tratcher commented 7 years ago

This issue was moved to aspnet/BasicMiddleware#232