diff options
author | crupest <crupest@outlook.com> | 2019-04-24 00:22:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-24 00:22:25 +0800 |
commit | 3d6938ca60691f73bc0b570e7ca4af4f8251741c (patch) | |
tree | f0b1f683254cdd80f20ea84ea6e044e80ef61fdd /Timeline/Startup.cs | |
parent | 94cb3d601af2f658f93f8092f39c326c90c8d13f (diff) | |
download | timeline-3d6938ca60691f73bc0b570e7ca4af4f8251741c.tar.gz timeline-3d6938ca60691f73bc0b570e7ca4af4f8251741c.tar.bz2 timeline-3d6938ca60691f73bc0b570e7ca4af4f8251741c.zip |
Add ObjectExists implementation in cos. Remove Test host environment.
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 12d60843..46d0afe5 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -81,6 +81,8 @@ namespace Timeline }); }); + services.AddHttpClient(); + services.Configure<QCloudCosConfig>(Configuration.GetSection(nameof(QCloudCosConfig))); services.AddSingleton<IQCloudCosService, QCloudCosService>(); } @@ -88,15 +90,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 (Environment.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseExceptionHandler("/Error"); - } - app.UseCors(corsPolicyName); app.UseForwardedHeaders(new ForwardedHeadersOptions |