mirror of
https://github.com/spring-cloud/spring-cloud-netflix.git
synced 2026-09-17 23:59:04 +00:00
Add test.
This commit is contained in:
+13
@@ -719,6 +719,19 @@ public class PreDecorationFilterTests {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("CatchMayIgnoreException")
|
||||
@Test
|
||||
public void exceptionThrownForInsecurePathWithHash() {
|
||||
properties.setStripPrefix(false);
|
||||
request.setRequestURI("'/api/#/admin/index'");
|
||||
try {
|
||||
filter.run();
|
||||
}
|
||||
catch (Exception exception) {
|
||||
assertThat(exception).isInstanceOf(InsecureRequestPathException.class);
|
||||
}
|
||||
}
|
||||
|
||||
private Object getHeader(List<Pair<String, String>> headers, String key) {
|
||||
String value = null;
|
||||
for (Pair<String, String> pair : headers) {
|
||||
|
||||
Reference in New Issue
Block a user