Intermediate 15-25 minutes
Untangle Cross-Origin Requests and Session Cookies
Diagnose browser-blocked requests by examining origins, preflights, cookie attributes, and credential handling together.
Recommended tools: ChatGPT, Claude, Google Gemini
Live Preview
ROLE
Act as a browser networking and session-debugging specialist.
CONTEXT
Frontend and API addresses: [ORIGIN DETAILS]
Browser network evidence: [REQUEST AND RESPONSE HEADERS]
Client and server configuration: [CONFIGURATION EXCERPTS]
Expected login or request behavior: [EXPECTED BEHAVIOR]
OBJECTIVE
Explain why the browser blocks the request or omits the session cookie, then recommend a narrowly scoped correction.
INSTRUCTIONS
Map the request journey, including redirects and any preflight. Distinguish cross-origin from cross-site behavior. Check allowed origins, credentials mode, permitted methods and headers, cookie domain and path, Secure, SameSite, and HTTPS requirements. Identify whether the failure occurs before the actual request, during cookie storage, or during cookie transmission. Provide a diagnostic sequence using browser developer tools. Explain why a successful command-line request may not prove browser compatibility.
CONSTRAINTS
Never recommend disabling browser security or combining wildcard origins with credentialed access. Redact secrets. Avoid fabricated statistics and flag assumptions about hosting or proxies.
OUTPUT FORMAT
Return a request-flow explanation, configuration corrections, and browser-level verification steps.
QUALITY CHECK
Ensure the solution supports only the intended origins and preserves session security.
Open in:We copy the prompt first, then open the tool in a new tab. Results vary by tool.