From e7c20342ad6b2b49230c2879bc13c56a26ae68ca Mon Sep 17 00:00:00 2001 From: Marvin Date: Sun, 8 May 2022 11:10:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4405b=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/REPController.cs | 2 +- AMESCoreStudio.Web/Startup.cs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AMESCoreStudio.Web/Controllers/REPController.cs b/AMESCoreStudio.Web/Controllers/REPController.cs index f456bac0..fe97d580 100644 --- a/AMESCoreStudio.Web/Controllers/REPController.cs +++ b/AMESCoreStudio.Web/Controllers/REPController.cs @@ -374,7 +374,7 @@ namespace AMESCoreStudio.Web.Controllers } //頁面提交,id=0 添加,id>0 修改 - + [HttpPost] public async Task REP001RSaveAsync(REP001ViewModel model, IFormFile formFile) { IResultModel result; diff --git a/AMESCoreStudio.Web/Startup.cs b/AMESCoreStudio.Web/Startup.cs index f7ef5318..a9a60a98 100644 --- a/AMESCoreStudio.Web/Startup.cs +++ b/AMESCoreStudio.Web/Startup.cs @@ -53,6 +53,13 @@ namespace AMESCoreStudio.Web //} })); + /* + // ÿԴ + services.AddCors(options => + options.AddPolicy("AMESPolicy", + p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod())); + */ + services.AddLocalization(o => { o.ResourcesPath = "Resources"; @@ -118,6 +125,8 @@ namespace AMESCoreStudio.Web app.UseHsts(); } + //app.UseCors("AMESPolicy"); + //app.UseHttpsRedirection(); app.UseStaticFiles();