CloudFront: path routing without trailing slash

0

There are two CloudFront Behaviros.
If URL path is /articles/ or /articles/123, it will be routed to the server under ELB, but if /articles, it will be routed to S3.
I want to configure accesses to be routed to ELB even without trailing slash.  

Can anyone give me some advice?
Should I write a CloudFront Function to redirect or modify the path pattern to solve this problem?

PriorityPath patternOrigin
0/articles/*ELB
1default(*)S3
feita há 2 anos1997 visualizações
1 Resposta
1
Resposta aceita

Hi

you ca just change Cloudfront path to /articles* instead of /arcticles/* so all paths starting with /articles will be forwarded to ELB,

basically cloudfront uses path pattern so you can set the * in any part of your path

wish that works for you

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas