Lambda@Edge在哪里能找到“原始请求”的自定义标头?

0

【以下的问题经过翻译处理】 我有一个带有S3源的CloudFront分发。在源设置中添加了自定义标头(例如“x-test”)。该行为具有两个Lambda:用于“源请求”和“源响应”挂钩(均为NodeJS)。就“源响应”挂钩而言,一切都很完美,但是对于“源请求”挂钩,事件...标头对象中不会收到“x-test”标头。我阅读过的所有文档和文章都说,“源请求”Lambda也应该获得此标头。尝试将“x-test”标头添加到附加的“源请求策略”的白名单中-这并没有帮助。找不到任何原因为什么会发生这种情况?

profile picture
EXPERT
demandé il y a 6 mois27 vues
1 réponse
0

【以下的回答经过翻译处理】 对于“源请求”钩子,它们在这里:event.Records[0].cf.request.origin.s3.customHeaders,如果源是ALB,则在这里:event.Records[0].cf.request.origin.custom.customHeaders。

profile picture
EXPERT
répondu il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions