I need to request the rancher api from a react app.
What I found out is, that rancher needs authentication (I use bearer token) for the OPTIONS preflight. This preflight is sent from Chrome and Firefox before sending the real request. If the authentication details in the preflight are not sent, rancher surprisingly returns 401. This happens when running the app in Chrome and Firefox as well as performing a request via curl (curl -v -X OPTIONS https://api.example.io/v3).
The problem is that by default authentication details aren’t sent from browsers during preflight, so this is a real barrier to get ahead.
From my understanding and by reading docs etc. the preflight request should not contain any authentication details.
So, did I oversee something?
Any help and hints appreciated, thank you.