Cloudfront + Woocommerce - cart not updating

大兔子大兔子 提交于 2021-02-08 11:38:45

问题


I have recently added cloudfront to my wordpress site hosted on AWS.

At first my cart would not register any products being added to it - so I made a behaviour in cloudfront to not cache the cart, my account and checkout pages.

Now my users can only add a single product at a time - after adding a second it overwrites what was added in intially.

I believe it must be a problem with the caching behaviour of cloudfront. can anyone help me with what settings I need to get woocommerce to play nice with cloudfront?

here are my settings:

settings


回答1:


i ended up solving this by whitelisting all cookies in cloudfront.

I tried to only whitelist the woocommerce cookies but this didnt work - so not sure which ones I am missing, will keep exploring over the next few days

in the meantime can anyone ansewr if there is a security risk is whitelisting all coookies in cloudfront?




回答2:


The cookie I whitelisted is wp_woocommerce_session_*. This resolved the same issue I had.



来源:https://stackoverflow.com/questions/46125776/cloudfront-woocommerce-cart-not-updating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!