sorry poor english, current config this:
<bean class="org.springframework.session.web.http.defaultcookieserializer"> <property name="cookiename" value="test_sessionid"></property> <property name="cookiepath" value="/"></property> <!-- <property name="domainname" value="example.com"></property> --> <property name="domainnamepattern" value="^.+?\\.(\\w+\\.[a-z]+)$"></property> </bean>
i want custom domain,it working while configured domainname
property.but when configure domainnamepattern
above,it working on localhost
, ip address,but no www.example.com test.example.com
tks.
it looks not using valid regular expression (the expression escaped java string using xml). expression not match of domains use current domain. try following instead:
<bean class="org.springframework.session.web.http.defaultcookieserializer"> <property name="cookiename" value="test_sessionid"></property> <property name="cookiepath" value="/"></property> <!-- <property name="domainname" value="example.com"></property> --> <property name="domainnamepattern" value="^.+?\.(\w+\.[a-z]+)$"></property> </bean>
Comments
Post a Comment