diff --git a/src/main/java/net/sourceforge/plantuml/servlet/ProxyServlet.java b/src/main/java/net/sourceforge/plantuml/servlet/ProxyServlet.java index 0a7e026..a6f1d31 100644 --- a/src/main/java/net/sourceforge/plantuml/servlet/ProxyServlet.java +++ b/src/main/java/net/sourceforge/plantuml/servlet/ProxyServlet.java @@ -63,7 +63,16 @@ public class ProxyServlet extends HttpServlet { } } + private static boolean inTest = false; + + public static void goTest() { + inTest = true; + } + public static boolean forbiddenURL(String full) { + if (inTest) { + return false; + } if (full == null) { return true; } diff --git a/src/test/java/net/sourceforge/plantuml/servlet/WebappTestCase.java b/src/test/java/net/sourceforge/plantuml/servlet/WebappTestCase.java index 23030da..1652096 100644 --- a/src/test/java/net/sourceforge/plantuml/servlet/WebappTestCase.java +++ b/src/test/java/net/sourceforge/plantuml/servlet/WebappTestCase.java @@ -42,6 +42,7 @@ public abstract class WebappTestCase extends TestCase { @Override public void setUp() throws Exception { + net.sourceforge.plantuml.servlet.ProxyServlet.goTest(); serverUtils.startServer(); // logger.info(getServerUrl()); }