question

AlanAmes-2000 avatar image
1 Vote"
AlanAmes-2000 asked AlanAmes-2000 answered

Bad Request (400) request on working custom domain server

We have a working app deployed to our app domain https://vingineers-demo.azurewebsites.net/

We have set up the custom domain and loaded all of the SSL certificates, pointed the dns to https://sni.demo.vingineers.com

However, we are only getting "Bad Request (400)" from this HTTPs://demo.vingineers.com

All of our Azure configurations / front ends / debugs now say that it is working properly but we can't figure out what is causing this to fail.

Any support would be greatly appreciated!

azure-webapps-custom-domains
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlanAmes-2000 avatar image
1 Vote"
AlanAmes-2000 answered

Eventually found the anser:

Our Django server did not have the new domain in "ALLOWED_HOSTS" in settings.py.

I found this by doing other searching until this came up.

Normally we would have seen the warning for this, but the switch to a production mode caused us to miss the error!

Thanks for everyone's input.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ManuPhilip avatar image
0 Votes"
ManuPhilip answered ryanchill commented

Error 400 says that the request could not be understood by the server due to a syntax issue in the code used for the application. For code based on Node js environment value to address this issue can be set as NODE_OPTIONS with the value with the size you want set on your app. You may check in similar way for your code used

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The server is based on django. What we cannot understand is how the server is working fine when connecting via the azurewebsites.net link, but when connecting via our custom domain and SSL certificate (as you can see the connection is secure when you connect to https://demo.vingineers.com... the server seems to be responding... but I don't understand why they respond differently to the same request?

0 Votes 0 ·

Have a check on all the steps are followed while adding the custom domain also. An example deployment from my blog is here: how-to-configure-an-azure-app-from-marketplace-in-a-custom-domain


0 Votes 0 ·

I see that your custom domain name is responding to requests @AlanAmes-2000. How did you resolve your issue?

0 Votes 0 ·