Getting 'fetch has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present... on React page
while I am experienced in .NET and JavaScript, I am currently learning React and during the fetch to my REST API I am getting this error. Access to fetch at 'https://localhost:7142/api/Campaign' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Here is my Startup.cs using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microso
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.