From 4279e8186bf11a2d777fe7e0fb0c53d6a74f5fea Mon Sep 17 00:00:00 2001 From: "Tizian.Breuch" Date: Tue, 12 Aug 2025 15:59:32 +0200 Subject: [PATCH] zum testen --- Webshop.Api/Program.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Webshop.Api/Program.cs b/Webshop.Api/Program.cs index ade98bb..72b07bd 100644 --- a/Webshop.Api/Program.cs +++ b/Webshop.Api/Program.cs @@ -32,8 +32,20 @@ var options = new WebApplicationOptions // Diese Zeile setzt den WebRootPath explizit auf den wwwroot-Ordner. WebRootPath = "wwwroot" }; + var builder = WebApplication.CreateBuilder(options); +builder.Services.AddCors(options => +{ + options.AddPolicy("AllowNuxtApp", + policy => + { + policy.WithOrigins("http://localhost:3000") + .AllowAnyHeader() + .AllowAnyMethod(); + }); +}); + // --- 1. Dependency Injection Konfiguration --- // Datenbank-Kontext mit Split-Query-Verhalten für Performance-Optimierung