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

sonarqube 504 method not allowed #86

Closed
bennychai91 opened this issue Dec 18, 2017 · 5 comments
Closed

sonarqube 504 method not allowed #86

bennychai91 opened this issue Dec 18, 2017 · 5 comments
Labels

Comments

@bennychai91
Copy link

bennychai91 commented Dec 18, 2017

I try using sonarqube widget but get http code 504 , because the method has been using is OPTIONS , and sonarqube Is GET. I try to add method: 'GET' , but i get other erorr 401 noAuth

Can u help ?

@danielbayerlein
Copy link
Owner

Hi @bennychai91, do you use your own SonarQube instance? Is an authentication required?

@bennychai91
Copy link
Author

bennychai91 commented Dec 19, 2017

Yes my SonarQube instance using authentication , and I already add addkey to .env username and password , and i using postman to check the credential and valid , I don't know why ??

try {
  const res = fetch(`${url}/api/measures/component?componentKey=${componentKey}&metricKeys=${metricKeys}`,
  {
  opts,
  method: 'GET',
  credentials:'same-origin'
  })
  console.log(res)
  const json = await res.json()

the header not display

screen shot 2017-12-19 at 12 08 19 pm

@danielbayerlein
Copy link
Owner

Allow your SonarQube instance CORS? See https://github.com/danielbayerlein/dashboard#cross-origin-resource-sharing-cors

@bennychai91
Copy link
Author

I already using CORS on my local hapi-rest-proxy , but i get http code 500 internal server errorr ,

My solution right now is not using authentication required , if i using no auth is working well :(

@danielbayerlein
Copy link
Owner

Do you use a self-signed certificate? Please try to start the hapi-rest-proxy server with NODE_TLS_REJECT_UNAUTHORIZED=0.

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

No branches or pull requests

2 participants