yagna
yagna copied to clipboard
CORS Policy in REST API
Unable to connect to Rest API from browser due to CORS policy.
In most browsers, the Access-Control-Allow-Origin
header must be set to send a query to the yagna Rest API and receive a correct response. Now all responses without these header are blocked by browser.
Perhaps adding the Access-Control-Allow-Origin: *
header in response would solve the problem, or maybe the user should be able to configure this option for a specific origin?
- Talk with @mgordel about requirements and how should it work
- Header should be configurable from ENV (list of domains names)
- Headers list should be configurable per identity
(Maybe should be implemented as middlware)