src/main/java/cloud/tamacat/httpd/util/ReverseUtils.java
public static void rewriteSetCookieHeader(
			HttpRequest request, HttpResponse response, ReverseConfig reverseUrl) {
		Header[] cookies = response.getHeaders("Set-Cookie");
		ArrayList<String> newValues = new ArrayList<String>();
		for (Header h : cookies) {
			String value = h.getValue();
			String newValue = ReverseUtils.getConvertedSetCookieHeader(
					request, reverseUrl, value);
			if (StringUtils.isNotEmpty(newValue)) {
				newValues.add(newValue);
				response.removeHeader(h);
			}
		}
		for (String newValue : newValues) {
			response.addHeader("Set-Cookie", newValue);
		}
	}
/**
	 * <p>Rewrite the Set-Cookie response headers.
	 * @param response
	 * @param reverseUrl
	 */
Rewrite the Set-Cookie response headers.
@param response
@param reverseUrl
Rewrite the Set - Cookie response headers . @param response @param reverseUrl
public static void rewriteSetCookieHeader(
			HttpRequest request, HttpResponse response, ReverseConfig reverseUrl) {
		Header[] cookies = response.getHeaders("Set-Cookie");
		ArrayList<String> newValues = new ArrayList<String>();
		for (Header h : cookies) {
			String value = h.getValue();
			String newValue = ReverseUtils.getConvertedSetCookieHeader(
					request, reverseUrl, value);
			if (StringUtils.isNotEmpty(newValue)) {
				newValues.add(newValue);
				response.removeHeader(h);
			}
		}
		for (String newValue : newValues) {
			response.addHeader("Set-Cookie", newValue);
		}
	}
public static void rewriteSetCookieHeader ( HttpRequest request , HttpResponse response , ReverseConfig reverseUrl ) { Header [ ] cookies = response . getHeaders ( "Set-Cookie" ) ; ArrayList < String > newValues = new ArrayList < String > ( ) ; for ( Header h : cookies ) { String value = h . getValue ( ) ; String newValue = ReverseUtils . getConvertedSetCookieHeader ( request , reverseUrl , value ) ; if ( StringUtils . isNotEmpty ( newValue ) ) { newValues . add ( newValue ) ; response . removeHeader ( h ) ; } } for ( String newValue : newValues ) { response . addHeader ( "Set-Cookie" , newValue ) ; } }
<p>Rewrite the Set-Cookie response headers.
<p > Rewrite the Set - Cookie response headers .