diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-19 02:01:24 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-19 02:01:24 +0800 |
commit | 7907e0a9353ea54cdf9d3bc8ff7e13a3b53562b6 (patch) | |
tree | 3e6239b1c0800953204cd3fb8f8a61ba2f903875 /Timeline | |
parent | 501fe7b988dfbdea7a62f78cb50c1ac66d5f4a20 (diff) | |
download | timeline-7907e0a9353ea54cdf9d3bc8ff7e13a3b53562b6.tar.gz timeline-7907e0a9353ea54cdf9d3bc8ff7e13a3b53562b6.tar.bz2 timeline-7907e0a9353ea54cdf9d3bc8ff7e13a3b53562b6.zip |
Remove unused cors.
Diffstat (limited to 'Timeline')
-rw-r--r-- | Timeline/Startup.cs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index afc06d9b..66f648c3 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -16,8 +16,6 @@ namespace Timeline {
public class Startup
{
- private const string corsPolicyName = "MyPolicy";
-
public Startup(IConfiguration configuration, IHostingEnvironment environment)
{
Environment = environment;
@@ -36,17 +34,6 @@ namespace Timeline })
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
- services.AddCors(options =>
- {
- options.AddPolicy(corsPolicyName, builder =>
- {
- if (Environment.IsProduction())
- builder.WithOrigins("https://www.crupest.xyz", "https://crupest.xyz").AllowAnyMethod().AllowAnyHeader().AllowCredentials();
- else
- builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader();
- });
- });
-
services.Configure<JwtConfig>(Configuration.GetSection(nameof(JwtConfig)));
var jwtConfig = Configuration.GetSection(nameof(JwtConfig)).Get<JwtConfig>();
@@ -82,8 +69,6 @@ namespace Timeline // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app)
{
- app.UseCors(corsPolicyName);
-
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|