In fact, Authorization and no-cors are mutually exclusive. You yourself have forbidden to transfer logins, passwords, here and do not resent now;)
To transmit the same title, you must still put mode: "cors" .
In your case, if you do all this within the same site, this should be enough for the Autorization header Autorization be transmitted.
Below is a case where the site that sends the request, and the site that receives it - different sites. Cross domain queries are more complicated. (example.com is the site where fetch launched, yourserver.com is the site where the request is sent)
When sending such a cross-domain request, the browser will first send an OPTIONS request to the server:
OPTIONS / HTTP/1.1 Host: yourserver.com Origin: http://example.com Access-Control-Request-Method: POST Access-Control-Request-Headers: authorization
To this, your server must answer that it permits to transmit this whole thing, and it permits all this to the exact site that sends the request (Origin):
HTTP/1.1 200 OK Access-Control-Allow-Headers: authorization Access-Control-Allow-Origin: http://example.com (альтернатива:) Access-Control-Allow-Origin: *
And only then the browser, when it receives permission to send from the server, will send a real POST request with this unfortunate Authorization :
POST / HTTP/1.1 Host: yourserver.com Origin: http://example.com Authorization: Basic dXNlcjpwd2Q=
And when answering a POST request, yourserver.com still has to remember to indicate that it allows example.com to do this:
HTTP/1.1 200 OK Access-Control-Allow-Origin: http://example.com (альтернатива:) Access-Control-Allow-Origin: *
If you miss any of this, your fetch will not work. These are the paranoid modern browsers