on-internet
← Community

CloudFront redirect all requests with path prefix

Stack Overflow ·

I have a static web site which makes requests to an API server. I'm hosting this static pages with S3 and I'd like to use CloudFront to redirect the api calls to the api server. Api calls can be distinguished by a path prefix of api: domain.com/index.html s3/index.html domain.com/js/index.js s3/js/index.html domain.com/api/request api_server/api/request domain.com/api/other/request api_server/api/other/request I currently have two origins set up - one S3 origin for my S3 bucket (which is working) and another custom origin for my api server (which is not working). The custom origin settings are

Comments

Sign in or sign up to comment and upvote.

No comments yet.