thingsboard.github.io
thingsboard.github.io copied to clipboard
No 'Access-Control-Allow-Origin' in HTTP GET method
Getting error on HTTP REST Apis.
- [x] Feature Request
We are fetching data from REST APIS using GET method. We getting error as No 'Access-Control-Allow-Origin'
We want to get thingsboard data from REST APis, but http GET method is not working and we are not able to send headers, but http PUT and POST method has been working fine
The error in details as :
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.
How we can achive and solve error. I have try to using lot of siltiuon also checked CORS on chrome browser.
i just found the solution by adding new api/plugin/** (same as api/v1/**) into cors section in thingsboard.yml.
Update: you dont need to build just restart your thingsboard
I am following @zarzaid comment ,but not able to save thingsbaord.yml
"thingsboard.yml"
"thingsboard.yml" E212: Can't open file for writing
can you please help