Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'Access-Control-Allow-Origin' in HTTP GET method #107

Open
1 task done
Nitinkarande opened this issue Jun 2, 2018 · 2 comments
Open
1 task done

No 'Access-Control-Allow-Origin' in HTTP GET method #107

Nitinkarande opened this issue Jun 2, 2018 · 2 comments

Comments

@Nitinkarande
Copy link

Nitinkarande commented Jun 2, 2018

Getting error on HTTP REST Apis.

  • 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.

@zarzaid
Copy link

zarzaid commented Jan 28, 2019

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

@SuneethaYamani
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants