Can we use AWS Cloudfront and only cache the response for only certain requests
ie we only want to cache requests in Cloudfront for urls such as
POST https://server.com/?q="sometext"
Thanks
CloudFront can only cache the responses to request methods GET
and HEAD
(and, optionally, OPTIONS
).
CloudFront does not cache responses to requests that use other methods.
If your ?q=...
request is something idempotent, like a search query, consider using GET
instead of POST
, using <form method="get" ...>
for example, if it's coming from a form.