Linking Linux App Service as Static Web API (so that calls to host.domain/api are routed to app service) breaks the linux container in the App Service

Brian Gambrell 1 Reputation point
2022-11-01T18:41:04.197+00:00

I have a static web app which is react code and a linux app service. I can browse both. Everything works. When I go to Static Web App > APIs > Production -> Link and select my Linux App Service, the container restarts and errors out with the following error (taken from log stream):

2022-11-01T18:25:19.744895119Z Updating certificates in /etc/ssl/certs...
2022-11-01T18:25:28.359575828Z 11 added, 0 removed; done.
2022-11-01T18:25:28.360955029Z Running hooks in /etc/ca-certificates/update.d...
2022-11-01T18:25:28.369234330Z done.
2022-11-01T18:25:28.386571732Z Updated CA certificates
2022-11-01T18:25:29.431695966Z [40m [1m [33mwarn [39m [22m [49m: Middleware[0]
2022-11-01T18:25:29.431742766Z At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided

I've googled that last line and have found nothing helpful. If I unlink the static web app, remove the authentication setup it created, and restart the app service, it works just fine again. I can browse it no problem.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,858 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
761 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 15,851 Reputation points
    2022-11-08T07:22:26.243+00:00

    Hi @Brian Gambrell ,

    We are sorry to hear you are experiencing this issue. This error can be caused by different things such as network configuration issue where the request is getting block or you may have configured the CORS in your application which is blocking the request when deploying the application. Can you please double check your network/configuration to make sure the request is not being blocked?

    Thanks,
    Grace

    0 comments No comments