Skip to content

Commit 8187584

Browse files
committed
Add test.
1 parent 0232945 commit 8187584

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spring-cloud-netflix-zuul/src/test/java/org/springframework/cloud/netflix/zuul/filters/pre/PreDecorationFilterTests.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,19 @@ public void exceptionThrownForInsecurePath() {
719719
}
720720
}
721721

722+
@SuppressWarnings("CatchMayIgnoreException")
723+
@Test
724+
public void exceptionThrownForInsecurePathWithHash() {
725+
properties.setStripPrefix(false);
726+
request.setRequestURI("'/api/#/admin/index'");
727+
try {
728+
filter.run();
729+
}
730+
catch (Exception exception) {
731+
assertThat(exception).isInstanceOf(InsecureRequestPathException.class);
732+
}
733+
}
734+
722735
private Object getHeader(List<Pair<String, String>> headers, String key) {
723736
String value = null;
724737
for (Pair<String, String> pair : headers) {

0 commit comments

Comments
 (0)