[英]Disallowed Host error when trying to deploy me serverless app with Zappa
I've followed the tutorial for deploying zappa step-by-step. 我已按照教程逐步部署zappa 。 When it says to Add the returned URL to the ALLOWED_HOSTS
I have done that (as well as add the development server): 当它说Add the returned URL to the ALLOWED_HOSTS
我已经做到了(以及添加开发服务器):
ALLOWED_HOSTS = ['127.0.0.1', 'https://*******.execute-api.us-east-2.amazonaws.com/dev']
However I still get this error: 但是我仍然收到此错误:
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.
Removing https://
and /dev
is what solved the problem. 删除https://
和/dev
解决问题。 So your ALLOWED_HOSTS
should look like this: 因此,您的ALLOWED_HOSTS
应该如下所示:
ALLOWED_HOSTS = ['127.0.0.1', '*******.execute-api.us-east-2.amazonaws.com']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.