Skip to content

Commit

Permalink
COMMANDBOX-1630
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw429s committed Jul 14, 2024
1 parent ba383f4 commit 0de55e3
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 99 deletions.
2 changes: 1 addition & 1 deletion gradle/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.4-06bab10df910f6e01ed290108762a532f44f3f7e-96ea216b7cfb6883a6af15c191a94953a0596b9c
5.0.5-06bab10df910f6e01ed290108762a532f44f3f7e-96ea216b7cfb6883a6af15c191a94953a0596b9c
37 changes: 19 additions & 18 deletions src/main/java/runwar/RunwarConfigurer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
package runwar;

import static io.undertow.Handlers.predicate;
import static runwar.logging.RunwarLogger.LOG;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Arrays;

import javax.servlet.DispatcherType;
import javax.servlet.Filter;

import io.undertow.predicate.Predicates;
import io.undertow.server.handlers.cache.CacheHandler;
import io.undertow.server.handlers.cache.DirectBufferCache;
Expand All @@ -8,25 +24,8 @@
import io.undertow.servlet.handlers.DefaultServlet;
import io.undertow.util.MimeMappings;
import runwar.options.ServerOptions;
import runwar.security.SelfSignedCertificate;
import runwar.undertow.WebXMLParser;

import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.Servlet;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.GeneralSecurityException;
import java.util.*;
import java.util.BitSet;

import static io.undertow.Handlers.predicate;
import static io.undertow.servlet.Servlets.servlet;
import static runwar.logging.RunwarLogger.LOG;

public class RunwarConfigurer {

private static ServerOptions serverOptions;
Expand Down Expand Up @@ -189,7 +188,9 @@ private void configurePathInfoFilter(DeploymentInfo servletBuilder) throws Class
regexPathInfoFilter = (Class<Filter>) Server.class.getClassLoader()
.loadClass("org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter");
}
servletBuilder.addFilter(new FilterInfo("RegexPathInfoFilter", regexPathInfoFilter));
FilterInfo filterInfo = new FilterInfo("RegexPathInfoFilter", regexPathInfoFilter);
filterInfo.addInitParam("regex", "^(/.+?\\.cf[cm]|/.+?\\.bx[sm])(/.*)");
servletBuilder.addFilter(filterInfo);
servletBuilder.addFilterUrlMapping("RegexPathInfoFilter", "/*", DispatcherType.REQUEST);
servletBuilder.addFilterUrlMapping("RegexPathInfoFilter", "/*", DispatcherType.FORWARD);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/runwar/options/ServerOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,8 @@ public ServerOptions cfEngineName(String cfengineName) {
this.cfengineName = "adobe";
} else if (cfengineName.toLowerCase().contains("railo")) {
this.cfengineName = "railo";
} else if (cfengineName.toLowerCase().contains("boxlang")) {
this.cfengineName = "boxlang";
} else if (cfengineName.equals("")) {
this.cfengineName = "";
} else {
Expand Down
Loading

0 comments on commit 0de55e3

Please sign in to comment.