File tree 1 file changed +12
-4
lines changed
web/src/main/java/org/springframework/security/web/firewall
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .security .web .firewall ;
18
18
19
- import org .springframework .http .HttpMethod ;
20
-
21
- import javax .servlet .http .HttpServletRequest ;
22
- import javax .servlet .http .HttpServletResponse ;
23
19
import java .util .Arrays ;
24
20
import java .util .Collection ;
25
21
import java .util .Collections ;
26
22
import java .util .HashSet ;
27
23
import java .util .List ;
28
24
import java .util .Set ;
29
25
import java .util .function .Predicate ;
26
+ import javax .servlet .http .HttpServletRequest ;
27
+ import javax .servlet .http .HttpServletResponse ;
28
+
29
+ import org .springframework .http .HttpMethod ;
30
30
31
31
/**
32
32
* <p>
@@ -305,6 +305,14 @@ public void setAllowUrlEncodedPercent(boolean allowUrlEncodedPercent) {
305
305
}
306
306
}
307
307
308
+ /**
309
+ * <p>
310
+ * Determines which hostnames should be allowed. The default is to allow any hostname.
311
+ * </p>
312
+ *
313
+ * @param allowedHostnames the predicate for testing hostnames
314
+ * @since 5.2
315
+ */
308
316
public void setAllowedHostnames (Predicate <String > allowedHostnames ) {
309
317
if (allowedHostnames == null ) {
310
318
throw new IllegalArgumentException ("allowedHostnames cannot be null" );
You can’t perform that action at this time.
0 commit comments