Connecting one app Service to another using private link

77 Views Asked by At

I am trying to connect my apps together privately. Here is the setup:

  1. Webapp FrontEnd (Node 18) :
  2. Webapp Backend (.NET7)
  3. webApp CosmosDb (Azure Cosmos DB account)

Network Configuration:

  1. the frontend and backend are in the same app service plan Linux Basic: B2.
  2. frontEnd is public exposed
  3. backend is public blocked but has private endpoint
  4. frontEnd is trying to call backend using the https://backend-dev.azurewebsites.net
  5. All the subnets have the Micrsoft.Web service added. The frontend subnet has the webfarms delegation
  6. backend has the CORS with "*" added.
  7. The DNS are setup for all private links

Status:

  • From the Frontend SCM I can do a curl to this backend url. I get proper response
  • from browser I am getting 403
    • Request 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.
    • tried with "https://backend-dev.privatelink.azurewebsites.net" in frontnend code but did not work

Can someone help me out please. I tried the setups in this post as well. No luck

here is the resource graph enter image description here

nslookup from frontend ssh

enter image description here

1

There are 1 best solutions below

1
KonTheCat On

One thing I would check - are the private DNS zones linked to the vNet? This has cost me more pain than anything else in setups like this. Does the frontend resolve backend-dev.azurewebsites.net to the expected private IP?