英文:
Website routing through CloudFront, PHP Session Problem
问题
我有一个网站,例如:https://abcd.com,路由来自**AWS CloudFront
。网站正常加载,但是会话不会保持其状态**。每次刷新页面时,会话都会被重置。
该网站使用Codeigniter和PHP开发。
如果通过负载均衡器或直接访问服务器进行路由,网站正常加载,并且会话保持其状态。但是通过CloudFront路由时,存在会话状态问题。
有人可以帮忙吗?
英文:
I have a website eg: https://abcd.com, routing from AWS CloudFront.
The website is loading properly. However, the session is not maintaining its state. On every refresh the session gets reset.
The website is developed using Codeigniter, PHP.
If the routing is through Load Balancer or directly to the server, the website loads properly and also the session maintains its state. But when routed through CloudFront, there is a session state problem.
Can anyone help?
答案1
得分: 1
将Cloudfront配置为将cookie转发到您的负载均衡器,特别是session_id。
英文:
Configure Cloudfront to forward cookies to your load balancer, especially the session_id
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论