From c58373488d35f38a39e8f808d762f8154a20a5e4 Mon Sep 17 00:00:00 2001 From: "seonkyu.kim" Date: Mon, 17 Feb 2025 23:43:41 +0900 Subject: [PATCH] =?UTF-8?q?[=F0=9F=91=B7=F0=9F=8F=BB]=20=EC=B1=84=ED=8C=85?= =?UTF-8?q?(Base)=20=EC=88=98=EC=A0=95=203=EC=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: seonkyu.kim --- Program.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index d9d6837..c5529ee 100644 --- a/Program.cs +++ b/Program.cs @@ -80,11 +80,11 @@ builder.Services.AddCors(option => option.AddPolicy("CorsPolicy", builder => { builder - // .AllowAnyOrigin() + .WithOrigins("https://devacamate.ipstein.myds.me", "https://acamate.ipstein.myds.me") // 특정 도메인만 허용 .AllowAnyMethod() .AllowAnyHeader() - .AllowCredentials() - .SetIsOriginAllowed(host => true); + .AllowCredentials(); + }); }); @@ -107,12 +107,14 @@ else } -// app.UseHttpsRedirection(); +app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); + app.UseCors("CorsPolicy"); + app.UseRouting(); app.UseWebSockets();