title: Avoiding getting "Invalid HTTP_HOST header: 'localhost'" message with Django + Elastic Beanstalk
body: <p>I've got a Django app setup on Elastic Beanstalk. Working and running great.</p>
  
  <p>I have my settings file set up with only the allowed hosts needed --</p>
  
  <p><code>ALLOWED_HOSTS = ['mysite.com']</code></p>
  
  <p>I get the Django errors sent to my email -- which normally I like. However, every time I redeploy my app (which I do from uploading a ZIP folder, not through CLI) I get this message</p>
  
  <p><code>Invalid HTTP_HOST header: 'localhost'. You may need to add 'localhost' to ALLOWED_HOSTS.</code></p>
  
  <p>I'm having no problems running my site, I just don't like getting this error. I think I could just add localhost (or 127.0.0.1 probably) as an allowed host--however I'm not sure if this is a good idea for security reasons. </p>
  
  <p>What might be happening here and how can I fix it? Is adding these hosts OK?</p>
  
  <p>EDIT:</p>
  
  <p>To clarify, this is happening when I <em>deploy</em> my code to Elastic Beanstalk -- not when I'm running it locally. </p>