ansible-runner-service
ansible-runner-service copied to clipboard
How do I enable CORS headers on ansible-runner-service
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.