瀏覽代碼

Merge branch 'master' of http://git.12345lm.cn/Fengwo/filestorage

Dun.Jason 9 月之前
父節點
當前提交
dba20cbbc4
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 7 0
      src/FileStorage.Host/StartupExtensions.cs
  2. 1 1
      src/FileStorage.Host/config/appsettings.json

+ 7 - 0
src/FileStorage.Host/StartupExtensions.cs

@@ -1,5 +1,6 @@
 using FileStorage.Repository.SqlSugar.Extensions;
 using Microsoft.AspNetCore.Authentication;
+using Microsoft.AspNetCore.Server.Kestrel.Core;
 using Microsoft.Extensions.FileProviders;
 using Serilog;
 using XF.Domain.Dependency;
@@ -43,6 +44,12 @@ internal static class StartupExtensions
         // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
         services.AddEndpointsApiExplorer();
 
+        //取消请求体大小限制
+        services.Configure<KestrelServerOptions>(d =>
+        {
+            d.Limits.MaxRequestBodySize = null;
+        });
+
         services
             //swagger
             .RegisterSwagger()

+ 1 - 1
src/FileStorage.Host/config/appsettings.json

@@ -7,7 +7,7 @@
   },
   "Swagger": true,
   "Cors": {
-    "Origins": [ "http://localhost:8888", "http://hotline.12345lm.cn", "http://hotline.fw.com" ]
+    "Origins": [ "http://hotline.12345lm.cn", "http://110.188.24.28:50102", "http://localhost:8888", "http://110.188.24.28:50301" ]
   },
   "DatabaseConfiguration": {
     "ApplyDbMigrations": false,