How to block HTTP and allows only HTTPS for AWS API Gateway with custom domain name map

好久不见. 提交于 2021-01-27 14:10:16

问题


I've added certificate with custom domain name map in AWS API gateway but it allows HTTP automatically, how can I block normal HTTP and only allows HTTPS?


回答1:


All API Gateway APIs are fronted with a CloudFront distribution. Each of these CloudFront distributions (whether it's a Custom Domain like yours or the default *.execute-api distribution) is configured to redirect all HTTP requests to HTTPS. Although CloudFront has the option to strictly require HTTPS and return 403 on HTTP requests we currently don't expose this option for simplicity.

If you feel you have valid use case for requiring HTTPS without a redirect please open a support ticket and the team can evaluate your request.



来源:https://stackoverflow.com/questions/44200229/how-to-block-http-and-allows-only-https-for-aws-api-gateway-with-custom-domain-n

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!