Skip to content

Instantly share code, notes, and snippets.

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 ChaosEngine/91814adf2ab0e4ae59540db903559cf8 to your computer and use it in GitHub Desktop.
Save ChaosEngine/91814adf2ab0e4ae59540db903559cf8 to your computer and use it in GitHub Desktop.
Swashbuckle.AspNetCore/issues/600
diff --git a/test/WebSites/Basic/Basic.csproj b/test/WebSites/Basic/Basic.csproj
index f38e99c..a5c8cf7 100644
--- a/test/WebSites/Basic/Basic.csproj
+++ b/test/WebSites/Basic/Basic.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>net461</TargetFramework>
<NoWarn>$(NoWarn);1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
@@ -20,5 +20,6 @@
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
+ <PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.0.1" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/test/WebSites/Basic/Startup.cs b/test/WebSites/Basic/Startup.cs
index 8cbcbb6..1d4b359 100644
--- a/test/WebSites/Basic/Startup.cs
+++ b/test/WebSites/Basic/Startup.cs
@@ -22,6 +22,8 @@ namespace Basic
// Use this method to add services to the container
public void ConfigureServices(IServiceCollection services)
{
+ services.AddResponseCompression();
+
services
.AddMvc()
.AddJsonOptions(options =>
@@ -67,6 +69,8 @@ namespace Basic
loggerFactory.AddConsole();
loggerFactory.AddDebug();
+ app.UseResponseCompression();
+
// Add MVC to the request pipeline.
app.UseDeveloperExceptionPage();
app.UseMvc();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment