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
질문됨 2년 전1997회 조회
1개 답변
1
수락된 답변

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

답변함 2년 전

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

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

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

관련 콘텐츠