An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you are working with Azure Static Web App and not Static website hosting in Azure Storage
Please let me know if my understanding is incorrect.
I believe you should use a Private EndPoint to make the site only accessible via Private (internal) network.
Your exact requirement is documented here : Configure private endpoint in Azure Static Web Apps
NOTE:
- If your app has a private endpoint enabled, the server responds with a
403status code if the request comes from a public IP address. - This behavior applies to both the production environment as well as any staging environments.
- The only way to reach the app is to use the private endpoint deployed within your VNet
Also, you must take care of the DNS Resolution part so that "CustomApp1.domain.com" resolves to a private IP and not a Public IP within your private network.
You can follow this architecture for DNS : Virtual network and on-premises workloads using a DNS forwarder
Please let us know if we can be of any further assistance here.
Thanks,
Kapil
Please Accept an answer if correct.
Original posters help the community find answers faster by identifying the correct answer.