✅ .net 7 rest api CORS issue with Authentication
Hey so I'm trying to set up something I've never done before so I can get the PC name of people connecting to my API
(This is a business Intranet website that calls the api)
This is my program.cs
it works as intended in swagger but when I use my front end app it gives me a cors error
Any help would be appreciate
7 Replies
Also if I strip out Authentication it works but doesn't send the right info back
so can't access the pc name
Http Vs https
Your cors policy says https, but you are visiting from http
He has one for both
no?
I do have one for both
Ah yep, mobile made that hard to see 😄
try removing the trailing slash
yeah i'd say that
That was it!
Really thank you both. That was the most annoying thing I've dealt with in a long time