Makes ProxyExchange.DEFAULT_SENSITIVE read only.

Fixes gh-2413
This commit is contained in:
spencergibb
2021-11-23 16:41:18 -05:00
parent a10b61c8e1
commit cb23319663
2 changed files with 5 additions and 2 deletions

View File

@@ -140,7 +140,8 @@ public class ProxyExchange<T> {
/**
* Contains headers that are considered case-sensitive by default.
*/
public static Set<String> DEFAULT_SENSITIVE = new HashSet<>(Arrays.asList("cookie", "authorization"));
public static Set<String> DEFAULT_SENSITIVE = Collections
.unmodifiableSet(new HashSet<>(Arrays.asList("cookie", "authorization")));
private URI uri;

View File

@@ -20,6 +20,7 @@ import java.lang.reflect.Type;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Function;
@@ -113,7 +114,8 @@ public class ProxyExchange<T> {
/**
* Contains headers that are considered case-sensitive by default.
*/
public static Set<String> DEFAULT_SENSITIVE = new HashSet<>(Arrays.asList("cookie", "authorization"));
public static Set<String> DEFAULT_SENSITIVE = Collections
.unmodifiableSet(new HashSet<>(Arrays.asList("cookie", "authorization")));
private HttpMethod httpMethod;