angularjs - docker hub api giving No 'Access-Control-Allow-Origin' error -
i'm trying fetch list of official images docker hub using v2 api. if try curl or use postman, response correctly, when try fetch list using angularjs service, following error
xmlhttprequest cannot load https://hub.docker.com/v2/repositories/library/?page=8&page_size=15. no 'access-control-allow-origin' header present on requested resource. origin 'http://run.plnkr.co' therefore not allowed access.
can suggest solution this. how can enable cors this?
cors enabled on server side, , not case. :
1) use proxy, instance ngnix, , make sure request made localhost/whatever redirected hub.docker.com . way can "cheat" cross-origin block
2) if need temporary , dirty solution more install chrome/safari plugins bypass cors security check
Comments
Post a Comment