0

Original domain for which the distribution is set up for

www.acme.com

Set up an origin:

Origin Domain Name: pre-prod.backend.com
Origin Path: /abc/asset/acme

Cache Behaviour Settings for the distribution:

Path Pattern: /asset/*

I am expecting that when I request

https://www.acme.com/asset/picture.jpg

it is reverse proxied to:

https://pre-prod.backend.com/abc/asset/acme/picture.jpg

Is this possible or do I have to use something more complicated like nginx?

David Newcomb
  • 275
  • 1
  • 5
  • 14
  • Are you asking because you've tried and it's not working, or are you asking if it can be done at all? – ceejayoz Dec 21 '18 at 16:00
  • Both! First attempt I had gateway errors because I hadn't set the correct protocol between acme and backend. Fixed that and now it looks like the behaviour is being ignored as it seems to fallback on my S3 behaviour which has lower precedence. So am I doing something wrong or is this functionality not available? – David Newcomb Dec 21 '18 at 16:20
  • The functionality is definitely available. If this is a recent change, you may need to invalidate the URLs in question (as it may have cached the older S3 behaviors). – ceejayoz Dec 21 '18 at 16:22
  • This is possible to do, as described here: https://serverfault.com/questions/833360/what-aws-service-to-avoid-cors-issues-with-s3-static-content-and-aws-backends – kopelitsa Mar 06 '19 at 12:39

0 Answers0