简体   繁体   English

如何停止symfony2创建会话cookie或如何在config.yml中加密会话?

[英]How to stop symfony2 to create session cookie or how can i encrypt session in config.yml?

I am trying to encrypt session data which is active after and before login in symfony2 . 我正在尝试加密在symfony2中登录之后和之前处于活动状态的会话数据。

Is there any option which will make session cookie data encrypted 是否有任何选项可使会话cookie数据加密

session:
  name: php_sess_id
  save_path: %kernel.root_dir%/cache/sessions
  cookie_secure: true
  cookie_httponly: true
  cookie_lifetime: 0

Is this possible to stop sending session cookie with symfony2 or encrypt the session cookie data. 是否可以停止使用symfony2发送会话cookie或加密会话cookie数据。

As I understand Symfony 2.1+ on the contrary to 2.0 only creates session when necessary. 据我了解,与2.0相反, Symfony 2.1+仅在必要时创建会话。 Therefore, if you're seeing PHPSESSID it means than some component is using it. 因此,如果看到的是PHPSESSID则意味着某些组件正在使用它。

You could always set up HTTPS . 您始终可以设置HTTPS That way everything will be encrypted... 这样,所有内容都会被加密...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM