Archived
Private
Public Access
1
0

Login finished

This commit is contained in:
2023-04-15 17:54:37 +02:00
parent 7165ce1ae3
commit 72f08fc9cb
25 changed files with 412 additions and 62 deletions

View File

@@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Cors.Infrastructure;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) {
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseCors(options => {
options.WithOrigins("http://localhost:8100");
options.AllowCredentials();
});
app.UseAuthorization();
app.MapControllers();
app.Run();