7 – How do I fix the “You’re attempting to access the site via IP address or invalid hostname.” error?

I’m running Drupal 7 on Pantheon and have started getting the following error message whenever I try to save content.

You’re attempting to access a Pantheon site via IP address or invalid hostname. Please use a valid hostname.

I’ve found a number of related issues online:

Most of these articles reference Drupal 7, but all of the fixes are for Drupal 8.

I’m experiencing this problem in both dev and in production (though user interactions on the live site seem to be fine, thank goodness). It started a week ago, and now I’m functionally locked out from creating new content or editing most of the site. It affects all of my browsers, both of my laptops and occurs whether I’m connecting via wifi or tethering data from my phone (a separate ISP), so this isn’t a local issue.

How do I resolve it for Drupal 7?