Wagtail preview post 400 error

Since there were a number of errors found when searching for this but I can't find one that mentioned this solution, I would put the notes here, hopefully, Google will catch this up as well ;)

In our case, it was the Site settings not properly configured. It looked like this when the error appeared:-

You need to change that localhost to your actual domain such as yoursite.com and the Preview would then works.