Update ProxyAcceptCookiePolicy.java

The guide says: When we create an instance of ProxyAcceptCookiePolicy, we pass in a String of the domain address we would like to accept cookies from **in addition to** the original server.
This commit is contained in:
Orange
2019-03-08 19:39:51 +08:00
committed by GitHub
parent c5fbfa2329
commit 2f5ff0c75b

View File

@@ -17,8 +17,8 @@ public class ProxyAcceptCookiePolicy implements CookiePolicy {
host = uri.getHost(); host = uri.getHost();
} }
if (!HttpCookie.domainMatches(acceptedProxy, host)) { if (HttpCookie.domainMatches(acceptedProxy, host)) {
return false; return true;
} }
return CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie); return CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie);