问题原文
原帖链接 · alancc · CC BY-SA 4.0
I am trying to add the "Host" header as a custom header when creating an Amazon Cloudfront Distribution. However, I always get the error "The parameter HeaderName : Host is not allowed".
I tried to edit the "Cache policy" by going to "Cache key settings" -> "Headers - Include the following headers" and add "Host" to the list. But this still didn't work. What is the problem?
社区高分解答
原帖链接 · Muhammad Dyas Yaskur · CC BY-SA 4.0
Official docs says
You can’t configure CloudFront to add any of the following headers to requests that it sends to your origin:
Cache-Control
Connection
Content-Length
Cookie
Host
If-Match
If-Modified-Since
If-None-Match
If-Range
If-Unmodified-Since
Max-Forwards
Pragma
Proxy-Authorization
Proxy-Connection
Range
Request-Range
TE
Trailer
Transfer-Encoding
Upgrade
Via
Headers that begin with X-Amz-
Headers that begin with X-Edge-
X-Real-Ip
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
