Initial commit - Auth

This commit is contained in:
2026-08-05 21:15:14 +03:00
commit dda4d9e63f
1490 changed files with 53289 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Auth.API.Config;
public static class Cors
{
public static IServiceCollection AddCustomCors(this IServiceCollection services)
{
services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins("http://localhost:5211", "http://localhost:5055")
.AllowAnyHeader()
.AllowAnyMethod().AllowCredentials()
.WithExposedHeaders("*");
;
});
options.AddPolicy(
"default",
builder =>
{
builder
.WithOrigins("http://localhost:5211" , "http://localhost:5055")
.AllowAnyHeader()
.AllowAnyMethod().AllowCredentials()
.WithExposedHeaders("*");
;
}
);
});
return services;
}
}