function handleXhrOpen(method, url, xhr) {
        const url_obj = new URL(url);
        let proxyUrl = unlockGoogleVideo(url_obj);
        if (proxyUrl) {
            // Exclude credentials from XMLHttpRequest
            Object.defineProperty(xhr, 'withCredentials', {
                set: () => {},
                get: () => false,
            });
            return proxyUrl.toString();
        }

        if (url_obj.pathname.indexOf('/youtubei/') === 0) {
            // Store auth headers in storage for further usage.
            attach$4(xhr, 'setRequestHeader', ([headerName, headerValue]) => {
                if (Config.GOOGLE_AUTH_HEADER_NAMES.includes(headerName)) {
                    set(headerName, headerValue);
                }
            });
        }

        if (Config.SKIP_CONTENT_WARNINGS && method === 'POST' && ['/youtubei/v1/player', '/youtubei/v1/next'].includes(url_obj.pathname)) {
            // Add content check flags to player and next request (this will skip content warnings)
            attach$4(xhr, 'send', (args) => {
                if (typeof args[0] === 'string') {
                    args[0] = setContentCheckOk(args[0]);
                }
            });
        }
    }
Handles XMLHttpRequests and
- Rewrite Googlevideo URLs to Proxy URLs (if necessary)
- Store auth headers for the authentication of further unlock requests.
- Add "content check ok" flags to request bodys