本文介绍了是否有一个基于cookies的会话存储nodejs(连接,快递)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在rails中,默认会话存储使用Cookie。会话被封送并用秘密密钥签名,以便客户端无法使用它。这种方法是非常可扩展的,不需要任何类型的后端工作。

in rails the default session store uses cookies. the session is marshaled and signed with a secret key so that client can't temper with it. this approach is very scalable and doesn't require any kind of 'backend' to work.

我没有找到类似于Express或Connect的东西。 >

I can't find anything like that for Express or Connect.

推荐答案

连接2x有一个内置的,这是一个简单的例子,使用Express 3x 与新的签名的Cookie支持。你仍然可以做同样的事情,没有升级,但你需要使用utils而不是那些getter

Connect 2x has one built-in and this is an example of how simple it would be to get something basic going with Express 3x https://gist.github.com/1491756 with the new signed cookie support. You can still do the same thing without upgrading but you'll need to use utils instead of those getters

这篇关于是否有一个基于cookies的会话存储nodejs(连接,快递)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 01:17