Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Flashes won't clear when using redis-backed session storage #911

Closed
iandelahorne opened this issue Feb 9, 2018 · 2 comments
Closed

Flashes won't clear when using redis-backed session storage #911

iandelahorne opened this issue Feb 9, 2018 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Feel free to contribute!

Comments

@iandelahorne
Copy link

Seeing that buffalo uses gorilla's sessions package, I wanted to replace the cookie storage with a redis-backed storage from gopkg.in/boj/redistore.v1. When I did this, flash messages won't clear after dismissing them and reloading the page.

I created a repo at lflux/sessionthing where you can reproduce this by:

  1. Setting up a Redis server at :6379
  2. Cloning the repo and running buffalo dev
  3. Visit http://localhost:3000/flash which will redirect to /
  4. See the flash message Success flash. Dismiss and reload the page
  5. The flash message will persist.

By setting useRedis = false in app.go which uses the default cookie storage, the flash message will no longer persist over page loads.

@markbates markbates added the help wanted Feel free to contribute! label Feb 9, 2018
@paganotoni paganotoni self-assigned this Feb 15, 2018
@paganotoni
Copy link
Member

paganotoni commented Apr 6, 2018

I Looked into this one, our problem seems to be in here If we remove the Save call it works for Redis, but will not work for our default session store.

@stanislas-m stanislas-m added the bug Something isn't working label Apr 16, 2018
@stanislas-m
Copy link
Member

Fixed with #1141.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Feel free to contribute!
Projects
None yet
Development

No branches or pull requests

4 participants