From b5a9e36de3dd162db0753000a4d8713e91c79418 Mon Sep 17 00:00:00 2001 From: AndreStork Date: Thu, 6 Nov 2025 11:20:39 +0000 Subject: [PATCH] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a74aac2..4c3993c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Informazioni su CORS Per svariati motivi il web frontend potrebbe non riuscire ad effettuare richieste API ad altri endpoint per direttive CORS. In caso di errori CORS assicurarsi che: -1. Il protocollo tra server web frontend e server API sia lo stesso (http con http o https con https, mai http con https o viceversa) -2. Nel caso in cui venga usato il protocollo HTTPS, il server API deve avere un certificato valido (il certificato self-signed di ASP.NET non funzionerà) +1. Il protocollo tra server web frontend e server API sia lo stesso (`HTTP` con `HTTP` o `HTTPS` con `HTTPS`, mai `HTTP` con `HTTPS` o viceversa) +2. Nel caso in cui venga usato il protocollo `HTTPS`, il server API deve avere un certificato valido (il certificato autofirmato di ASP.NET non funzionerà) 3. Nel progetto in ASP.NET aggiungere e usare una policy CORS verso l'endpoint del server web del frontend (accettare ogni origin è possibile ma sconsigliabile in production) assicurandosi di accettare ogni header e metodo. [Maggiori informazioni sull'implementazione delle policy CORS in ASP.NET Core](https://learn.microsoft.com/it-it/aspnet/core/security/cors?view=aspnetcore-8.0) \ No newline at end of file