Closed anhallbe closed 4 years ago
Update: It seems like the ION API service rejects requests from origins with http://
. A workaround (until a fix is added to the CLI) is to add the Origin header in odin.json
:
"/ODIN_DEV_TENANT": {
"target": "https://ionapi-server-address",
"secure": false,
"headers": {
"Origin": "https://localhost"
},
"changeOrigin": true,
"pathRewrite": {
"^/ODIN_DEV_TENANT": "/MY_TENANT"
},
"logLevel": "debug"
}
Hi there - having the same issue in Odin 2.2.1, Angular 7. Have tried the above workaround.
I'm trying to call an ION datalake API at this endpoint. Any advice? https://mingle-ionapi.se2.inforcloudsuite.com/ALLIANCEGRP_DEV/IONSERVICES/datalakeapi/v1/compass/jobs?resultFormat=text/csv
Error: Access to XMLHttpRequest at 'https://mingle-ionapi.se2.inforcloudsuite.com/ALLIANCEGRP_DEV/IONSERVICES/datalakeapi/v1/compass/jobs?resultFormat=text/csv' from origin 'http://localhost:8080' 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. [http://localhost:8080/]
A fix has been added in version 3.0.0-next.4
.
Hi guys you have an idea to make a configuration on m3 w to enable the url or I let CORS desable to give access to all the url because i have the same issue and I think the revolution of this problem is this idea
@Amiin29 Please stop commenting on tickets that are closed. Follow the documentation and samples to get started. You cannot call any endpoint directly in development, you need to use the proxy. What I can see from previous comments you are trying to call the M3 rest directly, it will never work. Take the latest version, use the proxy and if you find an issue be sure that you are following the samples and then create a ticket with a lot of information about all the steps that you have taken.
use the proxy and if you find an issue be sure that you are following the samples and then create a ticket with a lot of information about all the steps that you have taken.
thank you for your answer it is running correctly
use the proxy and if you find an issue be sure that you are following the samples and then create a ticket with a lot of information about all the steps that you have taken.
thank you for your answer it is running correctly and I apologize because I comment on the tickets that are closed
Describe the bug The ION API server returns an error when sending POST-requests through the IonApiService during development (
odin serve
).The server responds with a status 400, and the body:
To Reproduce Call
IonApiService.execute()
like so:When this is executed, "error" is logged.
Expected behavior The above code should log "success".
Version
@infor-up/m3-odin
: 2.1.2@infor-up/m3-odin-angular
: 2.1.2@infor-up/m3-odin-cli
: 2.1.2