HTTP Auth request fails in browser due to CORS, ok in Node
问题 I'm stuck trying to diagnose a problem where a GET request with HTTP Basic Auth succeeds in Node, but fails in the browser. The problem manifests directly as a CORS failure (there's no Access-Control-Allow-Origin on the 401 page). request.js:119 OPTIONS http://HOST?PARAMS 401 (Unauthorized) ClientRequest._onFinish @ request.js:119 (anonymous) @ request.js:61 ... 17:53:59.170 localhost/:1 Failed to load http://HOST?PARAMS: Response to preflight request doesn't pass access control check: No