Microsoft teams incoming webhook CORS error
Hi there,
I've been trying to get my web app (javascript) to send a message to a microsoft teams channel. I went through the steps of the "getting-started" page and then referred to this tutorial: https://medium.com/@john_93626/automating-posts-to-microsoft-teams-using-javascript-2b5afeab1974 .
Problem is, whenever i try to send a Post request to my url (using axios or XMLHttpRequest), i got an error saying: Access to XMLHttpRequest at 'https://outlook.office.com/webhook/8857e17c-5ad9-4561-8970-180c05644bc4@0400011a-0b87-4500-ac8a-610ba1dfd12f/IncomingWebhook/b4b6d53465994ee69efce77ac7a93bea/b193af5d-b425-447e-a187-7ee36bb8ac66' from origin 'http://localhost:3030' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
As you can see in my code below, i added the 'Access-Control-Allow-Origin' header to my request, but I still get the same error.