Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

302 重定向后 cookie 出错 #71

Open
wjiuxing opened this issue Dec 10, 2021 · 0 comments
Open

302 重定向后 cookie 出错 #71

wjiuxing opened this issue Dec 10, 2021 · 0 comments

Comments

@wjiuxing
Copy link
Contributor

项目里集成了 KKJSBridge/AjaxHook,发现个别 302重定向的网页 cookies 会出问题。(之前的 #45 也有可能是这个原因,暂时未抽时间去看)

测试代码如下:

NSString *url = @"https://clk.optaim.com/event.ng/Type=click&FlightID=202112&TargetID=sohu&Values=e1147096,32e248d6,9f339d15,7e5abed9&AdID=6058306&imei=__IMEI__&IDFA=__IDFA__&ip=__IP__&androidid=__ANDROIDID__";
WebViewController *web = [[WebViewController alloc] initWithUrl:url];
[self.navigationController pushViewController:web animated:YES];

cookie 显示出错,如下图:

出错cookie

原生 WKWebView 抓包显示 cookie 如下图:

正常显示的cookie

尝试过将 cookie hook 关闭,但是依然出错:

_jsBridgeEngine.config.enableCookieGetHook = NO;
_jsBridgeEngine.config.enableCookieSetHook = NO;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant