How to understand why CloudFront returns 301?

0

I posted it earlier here, but didn't receive a response: https://stackoverflow.com/questions/75640175/how-to-understand-why-cloudfront-returns-301

I have a distribution in CloudFront pointing to a custom origin. It worked just fine for more than five years and just a few weeks ago started to return 301 for all requests. The origin works as before, SSL certificates are valid both at the CloudFront endpoint and at the origin. The configuration of the "behavior" I didn't change in CloudFront. What could be the problem and how can I understand where is it?

If it helps, here is the URL: https://djk1be5eatcae.cloudfront.net/?u=https://www.yegor256.com/index.html. The origin that it points to is relay.jare.io. Thus, the URL to be used to fetch the content is this: https://relay.jare.io/?u=https://www.yegor256.com/index.html (works for me). All information is public, no sensitive information is revealed.

질문됨 일 년 전256회 조회
2개 답변
0

https://djk1be5eatcae.cloudfront.net/?u=https://www.yegor256.com/index.html for me returns:

Please, submit this stacktrace to GitHub and we'll try to help: https://github.com/yegor256/jare/issues

java.lang.IllegalStateException: [GET https://relay.jare.io/] failed in 0ms: [400] Parameter "u" is mandatory in https://relay.jare.io/
...

as if I hadn't passed "?u=...". Have you set a cache policy on your CF distribution that excludes this or all query string params from the cache & being sent to the origin? https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html

전문가
답변함 일 년 전
  • Dear expert, please try to use curl -v instead of a browser. You will understand what I'm talking about in the question above. Yes, I configured the caching policy to use all query arguments (NOT exclude them).

0

There was a problem with the version of TLS/SSL. I set it to SSLv3 and now it works.

답변함 일 년 전

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

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

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

관련 콘텐츠