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

fix: improve cycletls request options #28

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

ahmedrangel
Copy link
Contributor

I don't know about you, but I've been getting a lot of cloudflare challenges on Kient requests lately, but with these changes, I have been able to significantly reduce the cloudflare blocks. So that's why I'm doing this PR.

Plus, I added this line because, rarely, during authentication, the response from the sanctum/csrf request does not include the XSRF-TOKEN cookie.

const cookie = await this.cookieJar.getCookieString(requestUrl)
if (params.endpoint === 'mobile/login' && cookie && !cookie.includes('XSRF-TOKEN='))
throw new KientApiError('Failed to get XSRF-TOKEN cookie')

@ahmedrangel ahmedrangel changed the title fix: improve cycletls request headers fix: improve cycletls request options Dec 23, 2024
@zSoulweaver zSoulweaver merged commit c71cc59 into zSoulweaver:master Dec 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants