ansible-runner-service icon indicating copy to clipboard operation
ansible-runner-service copied to clipboard

How do I enable CORS headers on ansible-runner-service

Open sharuuu opened this issue 4 years ago • 0 comments

I use Ansible Runner Service to automate the execution of ansible playbooks. Am now trying to build a simple React UI to run some of my play book manually. But the request gets blocked by browser due to CORS policy.

Access to XMLHttpRequest at 'https://ansiblerunnerservice.lan:5001/api' from origin 'http://mywebserver.lan:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

The ansible-runner-service is written using Python & my skills on python is very basic. Am wondering how could I add the 'Access-Control-Allow-Origin' to whitelist the web app.

sharuuu avatar Jun 18 '20 19:06 sharuuu