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
demandé il y a 2 ans538 vues
1 réponse
1
Réponse acceptée

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
répondu il y a 2 ans

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