Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default cookie path for MetaProtoExtendedSession to contextPath #1758

Closed
Debilski opened this issue Jan 28, 2016 · 1 comment
Closed
Assignees
Milestone

Comments

@Debilski
Copy link

As suggested in https://groups.google.com/d/msg/liftweb/ZWmPdpIG1JA/dfAzbXiTBgAJ the cookie path for MetaProtoExtendedSession should be configurable and/or default to contextPath.

@Shadowfiend Shadowfiend self-assigned this Jan 31, 2016
@Shadowfiend Shadowfiend added this to the 3.1 milestone Jan 31, 2016
@Shadowfiend
Copy link
Member

This should be as simple as updating https://github.com/lift/framework/blob/master/persistence/mapper/src/main/scala/net/liftweb/mapper/ProtoExtendedSession.scala#L95 to use S.contextPath instead of "/", I think. However, this would be a breaking change.

As such, we probably need to make this customizable instead. I think we can add a:

  def sessionCookiePath: String = "/"

To the trait. We can even add a new trait, ContextPathExtendedCookie, that sets the above to S.contextPath, so you could do extends MetaProtoExtendedSession with ContextPathExtendedCookie or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants