I'm using Asp.net Core 6 with 2 projects:
- Static: https://localhost:6402/
- App: https://localhost:6403/
I'm getting this error, but I don't know how to fix it, I hope someone can help.
Access to font at 'https://localhost:6402/theme/01/plugins/global/fonts/@fortawesome/fa-solid-900.woff2' from origin 'https://localhost:6403' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
In the static project I added:
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", () => "Running...!");
and i also tried with web.config
<?xml version="1.0" encoding="UTF-8"?>
<add name="Access-Control-Allow-Origin" value="*" />
But it still doesn't work, what should I do now?