Skip to content

Commit

Permalink
APPNG-2473
Browse files Browse the repository at this point in the history
  • Loading branch information
madness-inc committed Apr 12, 2023
1 parent bc34688 commit 489875a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void requestDestroyed(HttpServletRequest httpServletRequest, Environment
Properties platformConfig = env.getAttribute(Scope.PLATFORM, Platform.Environment.PLATFORM_CONFIG);
List<String> userAgentPatterns = Arrays
.asList(platformConfig.getClob(Platform.Property.SESSION_FILTER).split(StringUtils.LF));
if (userAgentPatterns.stream().anyMatch(userAgent::matches)) {
if (userAgentPatterns.stream().map(StringUtils::trim).anyMatch(userAgent::matches)) {
Site site = environment().getSite();
if (null != site && RequestUtil
.getPathInfo(DefaultEnvironment.getGlobal(), site, httpServletRequest.getServletPath())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.appng.api.VHostMode;
import org.appng.api.model.Properties;
import org.appng.api.model.Site;
import org.appng.api.support.environment.DefaultEnvironment;
import org.appng.core.controller.Session;
import org.appng.core.controller.SessionListener;
import org.junit.Assert;
Expand Down Expand Up @@ -72,6 +73,7 @@ public static void setup() {
sitemap.put(site.getHost(), site);
platformMap.put(Platform.Environment.SITES, sitemap);
servletContext.setAttribute(Scope.PLATFORM.name(), platformMap);
DefaultEnvironment.initGlobal(servletContext);
}

@Test
Expand Down

0 comments on commit 489875a

Please sign in to comment.