[grid] Testing skip checks for content type works [skip ci]
@@ -45,6 +45,15 @@ public void shouldBlockRequestsWithNoContentType() {
assertThat(res.getStatus()).isEqualTo(HTTP_INTERNAL_ERROR);
}
+ @Test
+ public void shouldAllowRequestsWithNoContentTypeWhenSkipCheckOnMatches() {
+ HttpResponse res = new EnsureSpecCompliantHeaders(ImmutableList.of(), ImmutableSet.of("/gouda"))
+ .apply(alwaysOk)
+ .execute(new HttpRequest(POST, "/gouda"));
+
+ assertThat(res.getStatus()).isEqualTo(HTTP_OK);
+ }
+
@Test
public void requestsWithAnOriginHeaderShouldBeBlocked() {
HttpResponse res = new EnsureSpecCompliantHeaders(ImmutableList.of(), ImmutableSet.of())
