Skip to content

Commit

Permalink
ZCS-15830: ZBUG-3469 Drop headers defined in ZBUG-2800.
Browse files Browse the repository at this point in the history
  • Loading branch information
desouzas authored and preshitaagrawal committed Sep 26, 2024
1 parent 49ddecb commit 67f72ac
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Set;

Expand Down Expand Up @@ -48,6 +49,7 @@
import org.apache.http.impl.client.HttpClientBuilder;

import com.zimbra.common.httpclient.HttpClientUtil;
import com.zimbra.common.localconfig.LC;
import com.zimbra.common.service.ServiceException;
import com.zimbra.common.util.ByteUtil;
import com.zimbra.common.util.ZimbraHttpConnectionManager;
Expand Down Expand Up @@ -132,7 +134,8 @@ protected static boolean canProxyHeader(String header) {
|| header.equals("cache-control")
|| header.equals("cookie")
|| header.equals("origin")
|| header.equals("transfer-encoding"));
|| header.equals("transfer-encoding")
|| Arrays.asList(LC.proxy_servlet_drop_headers.value().toString().split(",")).contains(header));
}

protected static void sendError(HttpServletResponse resp, int statusCode, String code) throws IOException {
Expand Down

0 comments on commit 67f72ac

Please sign in to comment.