Adding a Blazor WASM app

This commit is contained in:
2026-03-22 01:10:14 +01:00
parent ce04cd8d77
commit c86c989cb5
81 changed files with 87512 additions and 2 deletions
Binary file not shown.
View File
@@ -9,7 +9,6 @@ using System.Text.Json;
namespace CityInfo.API.Controllers
{
[ApiController]
[Authorize]
[Route("api/cities")]
public class CitiesController: ControllerBase
{
@@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Mvc;
namespace CityInfo.API.Controllers
{
[Route("api/cities/{cityId}/pointsofinterest/", Name = "GetPointsOfInterest")]
[Authorize(Policy = "MustBeFromCharleroi")]
[ApiController]
public class PointsOfInterestController : ControllerBase
{
+7
View File
@@ -75,6 +75,11 @@ builder.Services.AddAuthorization(options =>
});
});
builder.Services.AddCors(options =>
{
options.AddPolicy("Open", builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
});
var app = builder.Build();
if (!app.Environment.IsDevelopment())
@@ -101,6 +106,8 @@ app.UseAuthentication();
app.UseAuthorization();
app.UseCors("Open");
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();