-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] Getting Unauthorized and CORS issue while making a post call to automation_requests API #18517
Comments
@himdel @martinpovolny @abellotti Thoughts here? |
EDIT: this is probably not relevant at all There are 2 different ways of authenticating against the API:
Most likely, the problem is that you have a manageiq cookie ( If you explicitly provide username & password via HTTP Basic to the API call, it should work. |
Sorry, I was reading this wrong... this is a CORS issue. Postman does not check cors, because it's a development tool. So, 2 options:
|
@abellotti any ideas? |
@himdel Do you think this is an issue that needs to be fixed or can it be closed? |
Well .. we don't need to support it for anything we're doing, and it was never possible before, so this is really a feature request. |
So, we can decide not to support it, EDIT: I think for pods, this would have to be a build-time setting, not a runtime one |
I am trying making post call to API using UI which is written in reactJS.
it works through postman. It's failing in OPTIONS
Background.js:38 OPTIONS https://abc.com/api/automation_requests 401 (Unauthorized)
abc.com/:1 Access to fetch at 'https://abc/api/automation_requests' from origin 'https://abc.xx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
The text was updated successfully, but these errors were encountered: