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();