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
posta 2 anni fa1997 visualizzazioni
1 Risposta
1
Risposta accettata

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

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande