diff options
author | crupest <crupest@outlook.com> | 2020-06-15 00:05:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-15 00:05:02 +0800 |
commit | e0b4c538228864c314900affae08df72edc9cd60 (patch) | |
tree | fc07d6d2622140f82a2c7e3c50aecf759c144043 /Timeline/Startup.cs | |
parent | cf2cfa4853944ce0af6b6c22a089b937dd59ccaf (diff) | |
download | timeline-e0b4c538228864c314900affae08df72edc9cd60.tar.gz timeline-e0b4c538228864c314900affae08df72edc9cd60.tar.bz2 timeline-e0b4c538228864c314900affae08df72edc9cd60.zip |
refactor(back): Use generic host.
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index a5eab4ad..2eb08f96 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -1,7 +1,6 @@ using AutoMapper;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
@@ -118,21 +117,6 @@ namespace Timeline // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app)
{
- if (string.Equals(System.Environment.GetEnvironmentVariable("ASPNETCORE_FORWARDEDHEADERS_ENABLED"), "true", StringComparison.OrdinalIgnoreCase))
- {
- var options = new ForwardedHeadersOptions
- {
- ForwardedHeaders = ForwardedHeaders.XForwardedFor |
- ForwardedHeaders.XForwardedProto
- };
- // Only loopback proxies are allowed by default.
- // Clear that restriction because forwarders are enabled by explicit
- // configuration.
- options.KnownNetworks.Clear();
- options.KnownProxies.Clear();
- app.UseForwardedHeaders(options);
- }
-
app.UseRouting();
if (!disableFrontEnd && (useMockFrontEnd || !Environment.IsDevelopment()))
|