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

Moqui cookie name to be configurable #304

Closed
shendepu opened this issue Jan 17, 2018 · 4 comments
Closed

Moqui cookie name to be configurable #304

shendepu opened this issue Jan 17, 2018 · 4 comments

Comments

@shendepu
Copy link
Contributor

This is a feature request.

Moqui framework currently generates two cookies moqui.visitor and JSESSIONID. the name of JSESSIONID can be configured in web.xml as below

    <session-config>
        <!-- session timeout in minutes; note that this may be overridden with webapp.session-config.@timeout in the Moqui Conf XML file -->
        <session-timeout>60</session-timeout>
        <cookie-config>
            <name>static.JSESSIONID</name>
            <http-only>true</http-only>
        </cookie-config>
        <tracking-mode>COOKIE</tracking-mode>
    </session-config>

but name of moqui.visitor can't be changed.

My use case is that I have two different apps (each runs with a moqui instance) in same domain with different path (using nginx to proxy, and they are not using default webroot component, but a new empty standalone screen as root). both apps returns cookie JSESSIONID and moqui.visitor, so they are collided.

There are two solutions for this:

  1. Set cookie with different path for each app
  2. Use different name of cookie for each app

And solution 2 seems to be more easy and flexible. It simply to add default property for name of JSESSIONID and moqui.visitor in moqui conf file. and use them rather than hard code.

If this use case is accepted, I can make a PR on this.

@shendepu
Copy link
Contributor Author

The name of session cookie name also can be changed by context-param like

    <context-param>
        <param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
        <param-value>static.SESSIONID</param-value>
    </context-param>

I see there is context-param element definition under webapp element in moqui-conf.xsd, but it seems not implemented.

@jonesde
Copy link
Member

jonesde commented Jan 17, 2018

This seems like a good thing to support. In the near future issues on GitHub will be disabled as part of the move to HiveMind. They are not yet disabled to avoid losing older issues, but all requests should now go in HiveMind on moqui.org. Please see:

https://www.moqui.org/m/docs/moqui/Community+Guide

@shendepu
Copy link
Contributor Author

I will create future requests in HiveMind. I've made a PR #305 for this feature.

@jonesde
Copy link
Member

jonesde commented Nov 28, 2018

Since this is covered by pull request #305 closing this issue.

@jonesde jonesde closed this as completed Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants