URGENT! Sudden CORS issues for web app

Tim Horwood 6 Reputation points
2022-12-17T19:30:59.923+00:00

I have a frontend web app and a nodejs app service. The frontend calls the NodeJS API. This is a live application that has been working with no problems, I wanted to add CORS approved domains so I added the domain of the fronten web app into the CORS domains for the nodejs app service, this however then resulted in CORS issues everywhere, so I removed the domain. The CORS settings are now blank, as they were prior to me attempting anything, however the CORS errors are persisting and the application is currently unusable.

The application right now is in the state prior to when I tried adding specific allowed domains for the API so I am not sure what the issue is?

Any help would be greatly appreciated!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,188 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 23,686 Reputation points Microsoft Employee
    2022-12-19T08:40:23.94+00:00

    @Tim Horwood Thank you for reaching out to Microsoft Q&A, Apologize for the inconvenience caused on this.

    Could you please help us with error message when you have tried to add the domain of frontend webapp as CORS origin to the nodejs app service?
    Instead of adding specific origin url can you try adding the wildcard and check whether it is working or not?

    Refer to this documentation on App service CORs or your own CORS and enable it accrodingly

    It is recommended for troubleshooting CORS issues to proceed with the following steps in order to determine the issue:-

    • Make sure that the CORS destination URL is included in the CORS settings list.
    • If the requests are requesting credentials, make sure to check Access-Control-Allow-Credentials.
    • Capture HAR File to identify the requests that are failing in order to identify if the contact URL is the one listed in CORS Settings.

    Feel free to reach back to me if you have any further questions on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.