Thingsboard No 'Access-Control-Allow-Origin' header is present on the requested resource. angularjs

不问归期 提交于 2019-12-11 06:34:35

问题


I am working on fetch data of thingsboard Restfull Http Apis using GET method, but we are not able to get fetch data.

Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://localhost:8888' is therefore not allowed access.
The response had HTTP status code 401.

We are calling Thingsboard Apis on Angularjs platform. How we can Solve this error.

POST Method has been working fine, but we are getting error on GET method of thingsboard.

Thanks in Advance!!


回答1:


You will need to make a CORS request, because the API you want to use, has resources on a different domain.



来源:https://stackoverflow.com/questions/49935854/thingsboard-no-access-control-allow-origin-header-is-present-on-the-requested

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!