CORS Headers for API

Hello,

I’m trying to write a new application using Blazor WebAssembly which can utilize the Octopus API to help manage some of the more complicated tasks in our environment. Unfortunately, when making requests from the client, I am not able to reach the API due to no CORS headers being preset on the preflight requests.

I did see that the on-premise version of Octopus allows for custom CORS headers, but I don’t seem to have that option with our Cloud environment.

Is this something that we can adjust in some fashion? The alternative is to create a server component to effective wrap and proxy requests to the API, which is not ideal as we would prefer for the application in question to be client with as few additional components as possible.

Hi James,
Thanks for reaching out.

Yes we do have CORS options available for end-user configuration in the Cloud. You can find it hidden away under Configuration–>Settings–>Web Portal.

Some settings are not configurable though but you can see the defaults (usually sane ones) at the page you linked.

Good luck with your app and let us know if you need anything else.

Kind Regards,
Paraic

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.