Hide
Failed to fetch http://qaapolloapi.gcmlp.com/portfolios
Possible cross-origin (CORS) issue? The URL origin (https://qaapolloapi.gcmlp.com)
does not match the page (https://confluence-open-api.herokuapp.com).
Check the server returns the correct 'Access-Control-Allow-*' headers.
It depends on how the remote host supports the CORS. In my OpenApi app I'm parsing the URL to request the document from the API that includes "Access-Control-Allow-Origin:*" .
Hi Jean,
I am from the company that produces Open API Documentation For Confluence, and I'd love to help you get it working.
Firstly, if you haven't done so already, you may want to check out the CORS section in our documentation, which may provide some useful help.
In particular, the header you need to add to the URL that hosts your API is:
`Access-Control-Allow-Origin: https://confluence-open-api.herokuapp.com`
If this still doesn't work, you may wish to check for any errors in the browser console; which often provides more clues as to what the problem is.
Finally, if you still need further help, please feel free to log a support request.
I hope this helps. Good luck!
Kind regards,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this is what I see in the browser console:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
I suppose this is because I am calling an http: instead of an https:
When I try another API (hosted in Azure) this is what I see:
Access to fetch at 'https://gcm-pub-masterentitydata-uat.azurewebsites.net/api/portfolios' from origin 'https://confluence-open-api.herokuapp.com' has been blocked by CORS policy: 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.
Is access to Azure APIs supported?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jean,
Yes, it should be possible to use Azure APIs, by adding a CORS policy to your API.
If you go to your Azure API, and under "All Operations", click the "+ Add Policy" link in "Outbound Processing".
In the "Add Outbound Policy" screen, click "Other Policies", and select CORS from the Cross Domain Policies list.
Then in <allowed-origins>, add https://confluence-open-api.herokuapp.com.
Hope this helps.
Regards,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
add added the CORS policy to my azure API:
But I am still getting the error message as above post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jean,
At this point it may be best if we move this discussion from the Developer Community to a support ticket, so that our team can assist you further.
In the support ticket, you will be able to provide us with more specific details (such as the URL you are trying to load, that you may otherwise not be comfortable sharing publicly with the community), so that we can work with you to determine the problem.
If you would like to log a support request, you can use the following link,
https://oharagroup.atlassian.net/servicedesk/customer/portal/1/create/1
Kind regards,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.