1 Answer
- Newest
- Most votes
- Most comments
0
If you returned a redirect as a response to a POST request your client will follow up on that redirect, not CloudFront. As you mentioned, 307 and 308 response codes should be followed on by the client without changing the HTTP method (see here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections).
I case you actually want to keep your traffic routing by CloudFront - you can use behaviors to routing to different origins based on path patterns (/env/test/hello --> origin 1, default behavior would go to origin 2).
More on behaviors can be found here: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistS3AndCustomOrigins.html
answered 2 years ago
Relevant content
- asked 3 months ago
- asked 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago