pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
501 stars 239 forks source link

Using Socket for Redis Session #48

Closed kphretiq closed 7 years ago

kphretiq commented 7 years ago

Apparently setting SESSION_REDIS = "/var/run/redis/redis.sock" . . . does not produce magic.

  File "/home/user/Projects/foo/venv/lib/python2.7/site-packages/flask_session/sessions.py", line 131, in open_session
    val = self.redis.get(self.key_prefix + sid)
AttributeError: 'str' object has no attribute 'get'

Am I missing something obvious, or are you not supporting using a socket for redis sessions at this point?

fengsp commented 7 years ago

Read the docs and you will find the right way to do it, SESSION_REDIS should be a redis.Redis instance.