You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don’t forward cookies to your origin – CloudFront doesn’t cache your objects based on cookie sent by the viewer. In addition, CloudFront removes cookies before forwarding requests to your origin, and removes Set-Cookie headers from responses before returning responses to your viewers.
To make CloudFront keep "Set-Cookie" header, I used following settings:
It'll be nice this can be configged directly in cloudformation template.
The text was updated successfully, but these errors were encountered:
Hey @wsxiaoys ,
Thanks for the help here, I'm pretty new to all the AWS jazz and it's not obvious to me which distributions I need to do the following changes for.
I had a hard time finding this setting in the first place so for anyone interested, it's in the AWS console, in the CloudFront service, make sure the region matches your needs (should be Global by default though), here there is a list of distributions, select one (which?), then go to the "behaviors" tab, select one (which?), and edit it. And there, in the menu, you will find the settings related to the screenshot from @wsxiaoys .
So here's my question, which distribution do I have to apply that to? And which behaviours? I could imagine the answer is "all" but I don't want to break something by doing so without understanding the implications.
Additional question, the name of the cookie is "not-actually-needed" but it is important to specify one. Does this randomly chosen name have to match across all distributions and behaviours?
By default CloudFront removed "Set-Cookie" Header from response, when behavior is set to "Not forwarding cookie to origin".
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html
To make CloudFront keep "Set-Cookie" header, I used following settings:
It'll be nice this can be configged directly in cloudformation template.
The text was updated successfully, but these errors were encountered: