brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
CORSConfigure Cross-Origin Resource Sharing correctly to avoid security issues and debugging pain.
Independent GitHub snapshot · Automated classification · Original documentation governs
Access-Control-Allow-Origin: * incompatible with credentials—must specify exact originAccess-Control-Allow-Credentials: true required for cookies/auth headerscredentials: 'include'; XHR: withCredentials = true* doesn't match subdomains—*.example.com is invalid, not a pattern* with credentials—specify origin dynamically from requestAccess-Control-Allow-Headers: * works in most browsers but not all—list explicitly for compatibilityAccess-Control-Expose-Headers: * same issue—list headers you need to exposeexample.com matches evilexample.com—anchor the patternnull origin: sandboxed iframes, file:// URLs—usually reject, never allow as trustedVary: Origin when response depends on origin—even if you allow only oneVary: Access-Control-Request-Headers, Access-Control-Request-Method for preflight caching correctnessAccess-Control-Expose-HeadersX-Request-ID, X-RateLimit-*, etc. need explicit exposure—common oversightAccess-Control-Max-Age: 86400 caches preflight for 24h—reduces OPTIONS traffic significantlymode: 'no-cors' succeeds but response is empty—usually not what you wantAccess-Control-Allow-Origin: "*", "https://example.com"—must be single value, not listAccess-Control-Allow-Private-Network: true for localhost access from public web