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
gefragt vor 2 Jahren1997 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen