我已逐步跟踪the tutorial for deploying zappa。当它告诉Add the returned URL to the ALLOWED_HOSTS
我已经这样做了(以及添加开发服务器):
ALLOWED_HOSTS = ['127.0.0.1', 'https://*******.execute-api.us-east-2.amazonaws.com/dev']
但是我仍然会收到此错误:
Invalid HTTP_HOST header: '********.execute-api.us-east-2.amazonaws.com'.
You may need to add '********.execute-api.us-east-2.amazonaws.com' to ALLOWED_HOSTS.
答案 0 :(得分:0)
删除https://
和/dev
是解决问题的方法。所以你的ALLOWED_HOSTS
应该是这样的:
ALLOWED_HOSTS = ['127.0.0.1', '*******.execute-api.us-east-2.amazonaws.com']