'Azure Web Bot works in Azure portal but displays error when embedded in a website

I created a bot using QnaMaker and published it to Azure Portal. It deployed successfully and works in the "Test in Web App" on Azure Portal but does not work when I use the embedded codes from channel in my website. below are screenshots of azure portal and the website on which the bot is being used. the bot works fine on azure but shows "Something went wrong" on the website. I tried creating a new Qna bot but the same error occurred.

enter image description here

enter image description here



Solution 1:[1]

The issue may raised because of not mentioning the "end points" related to the accepted domains.

  1. When we create Web bot and trying to include it in a Web Application, we need to whitelist the webpage.
  2. To achieve that operation, Go to CORS -> Add origins
  3. Now test the app from the website.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SairamTadepalli-MT