CloudFront behaviour Path pattern matching

0

In my CloudFront I have a behaviour with Path pattern /no/app* but I have a weird situation.

When the URL is /no/.%2fapp then it is matched by the above pattern.

Tbh I have no idea why this URL is used by customers, but it is equivalent to /no/./app which is automatically normalized by a browser to /no/app but when it is not encoded then the browser is passing it as it is.

Do you have any idea why it happens?

profile picture
MG
質問済み 2年前538ビュー
1回答
1
承認された回答

I got an answer from AWS Support:

Section 1.2.1 - Transcription

The design of URL encoding is to make sure all characters used in URI are in the range of US-ASCII.

Section 2.4 - When to Encode or Decode

When a URI is dereferenced, it need to be decoded.

Section 5.2.4 - Remove Dot Segments

If the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer.

Even if the URI is normalized for matching, Lambda@Edge gets the original request URI.

profile picture
MG
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ