how to enable CORS on an Azure Virtual Machine ?

Jespère KIKI 0 Reputation points

I am running an fastapi at localhost:8025 and nextjs app at localhost:3550., it work perfectly in local environment . However, in the virtual machine instance on azure it doesn't work and i'm getting CORS error. Inside my fastapi i have yet allowed all origins so i'm confused. Can someone help me solve this ?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,970 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
1,671 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TP 45,661 Reputation points


    Please verify that correct headers are being sent by the server and client. You can do this via browser Developer Tools -- Network tab, or using Fiddler or similar web debugging tool. In this way you can see what is actually being sent between client PC and server and narrow down source of the issue.

    Please click Accept Answer if the above was useful. If something is unclear or you further assistance please add a comment below.



    0 comments No comments