Cloudfront not adding response headers from Cloudfront functions when requests are made in HTTP/3

0

When HTTP/3 is enabled in Cloudfront, response headers added in Cloudfront functions (like the CORS headers shown in this example and the security headers in this example) are not actually added. However, these headers are added as usual when the requests are made in HTTP/2. Headers set with 'Response headers policy' in Cloudfront behaviors are also properly added.

Is it a bug or am I missing out on something?

Edit: Attach some screenshots for my configuration:

Distribution Settings

Behavior Settings

Cloudfront function

curl result

Karl_K
질문됨 2년 전1817회 조회
1개 답변
0

I've just tested this and had no issues with at least access-control-allow-origin being added when HTTP/3 is in use. This was the case when using both CloudFront Functions as well as Response Header Policies.

Please check that your function uses all lowercase for the header key names.

It may also be worth trying a different browser.

AWS
전문가
Paul_L
답변함 2년 전
  • Thank you for your response. Yes, the function is using all lowercase for the header key names. I've updated my question with some screenshots to show my configuration. In addition to curl shown in the screenshots, I've also tried the latest version of Firefox and Chrome, and the problem persists across the browsers.

  • I suggest you raise a case with AWS support to investigate further. Please provide them the x-amz-cf-id response headers for each of your examples above. You could also try removing and re-adding the cloudfront function association to see if that resolves the problem.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인