Adventures with APIM: Blazor WebAssembly CORS Issues

API Management

For the past couple of hours days I have been battling an issue 🤔 where my CORS policy in APIM did not seem to be working for my Blazor WebAssembly application.

I thought I had my APIM policy correct, allowed-origins and allowed-methods looked good.

Still was receiving the CORS issue?! 😤

Thought I had this problem before but wasn’t sure what I did to fix it.

Then it finally dawned on me 💡 … it is the Headers. I needed to set Allowed headers to * in my APIM CORS policy.

Once I made that change, no more CORS issue! 😀

Hopefully this saves someone, including my future self, a headache or two!