django app authentication fails on custom domain with SNI SSL bound cert. Default URL works fine

James Kester 21 Reputation points
2022-10-19T17:50:15.043+00:00

I have a Django app running in a docker container deployed on a appservice. The application works just fine on xxxxx.azurewebsites.net (the provided URL)

I then added a custom domain to the appservice via CNAME xxxxx.mysite.com. I then purchased and SSL cert through azure. And then verified my custom domain xxxxx.mysite.com and bound the SSL cert to it with SSL type SNI SSL.

When I browse to xxxxx.mysite.com my app loads (securely) and displays the login screen, however authentication fails both on the app side and the admin side. If I navigate to the URL that the CNAME is pointing at (xxxxx.azurewebsites.net) authentication works just fine on both the application and the admin.

This makes no sense to me, and I have to assume I'm missing some piece of configuration on the azure side.

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