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 | cbcd12e0a4b7e363e3e275b870ac3c20f1c96836 (patch) | |
tree | f0b1f683254cdd80f20ea84ea6e044e80ef61fdd /Timeline/Startup.cs | |
parent | bb35acd7b0065e54c3cad814c368fa71922f5742 (diff) | |
download | timeline-cbcd12e0a4b7e363e3e275b870ac3c20f1c96836.tar.gz timeline-cbcd12e0a4b7e363e3e275b870ac3c20f1c96836.tar.bz2 timeline-cbcd12e0a4b7e363e3e275b870ac3c20f1c96836.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 |