This commit is contained in:
mmrbnjd
2025-10-03 23:30:01 +03:30
parent ef2cf5ff30
commit 4df6c87012
34 changed files with 908 additions and 555 deletions

View File

@@ -55,7 +55,7 @@ builder.Services.AddScoped(typeof(IAsyncRepository<>), typeof(RepositoryBase<>))
builder.Services.AddScoped(typeof(RepositoryBase<>), typeof(RepositoryBase<>));
builder.Services.AddScoped<Back.Services.ServBase>();
builder.Services.AddScoped<MobileValidation> ();
builder.Services.AddScoped<Service.Main>();
//builder.Services.AddScoped<Service.Main>();
builder.Services.AddScoped<servTicket > ();
builder.Services.AddScoped<ServValidatinMsg>();
builder.Services.AddScoped<GetVerificationValidation> ();
@@ -104,10 +104,11 @@ builder.Services.AddCors(options =>
options.AddPolicy(origins,
policy =>
{
policy.WithOrigins("https://localhost:7224", "http://localhost:5107"
, "http://195.88.208.142", "http://moadiran.ir"
, "https://195.88.208.142", "https://moadiran.ir"
, "https://195.88.208.142:440", "https://moadiran.ir:440", "https://localhost:44346")
policy.AllowAnyOrigin()
//.WithOrigins("https://localhost:7224", "http://localhost:5107"
// , "http://195.88.208.142", "http://moadiran.ir"
// , "https://195.88.208.142", "https://moadiran.ir"
//, "https://195.88.208.142:440", "https://moadiran.ir:440", "https://localhost:44346")
.AllowAnyHeader()
.WithHeaders(HeaderNames.ContentType)
.AllowAnyMethod();
@@ -135,7 +136,7 @@ builder.Services.AddAuthentication("Bearer")
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
if (true || app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();