mirror of
https://github.com/7836246/cursor2api.git
synced 2026-06-06 14:16:08 +08:00
refactor: remove dead x-is-human token generation system
Cursor no longer validates the x-is-human header, so the entire token generation pipeline was dead code producing only error logs. Removed: - loadScripts(), fetchCursorScript(), generateToken(), replenishPool(), getXIsHumanToken() and token pool management from cursor-client.ts - scriptUrl config field and SCRIPT_URL env var support - unmaskedVendorWebGL/unmaskedRendererWebGL fingerprint fields - jscode/ script loading (env.js, main.js templates) - script_url and WebGL fields from config.yaml Kept: - Chrome TLS fingerprint headers (user-agent, sec-ch-ua, etc.) - x-is-human header sent as empty string (Cursor accepts it)
This commit is contained in:
@@ -90,11 +90,8 @@ export interface AppConfig {
|
||||
port: number;
|
||||
timeout: number;
|
||||
proxy?: string;
|
||||
scriptUrl: string;
|
||||
cursorModel: string;
|
||||
fingerprint: {
|
||||
unmaskedVendorWebGL: string;
|
||||
unmaskedRendererWebGL: string;
|
||||
userAgent: string;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user