alexedwards / scs

HTTP Session Management for Go
MIT License
2.09k stars 166 forks source link

Make writeSessionCookie public #98

Closed spekary closed 3 years ago

spekary commented 4 years ago

I am implementing a version of LoadAndSave where I still want to save everything in a cookie, but I am doing some in-between things. One thing in particular is that I am implementing a buffer pool instead of using your bufferedResponseWriter to gain a bit of performance improvement.

Anyway, I find I am re-implementing everything after next.ServeHTTP. Soooo, to prevent having to do all of that and worrying about your code changes, can you make writeSessionCookie public so I can use it?

alexedwards commented 3 years ago

Sorry that this took so long, I didn't want to export writeSessionCookie() until I was confident that the signature wouldn't need to change any more (the new RememberMe() functionality impacted it).

It's now exported in commit https://github.com/alexedwards/scs/commit/6da9476482d45889025d3c8967706650353fa5f3.