working on building desktop app using angular 4 and electron and try to get authentication token for jira but i am getting back status code: 500, any help to get around this issue. i believe it is cors issue :
here is request headers:
return message from server:
{"message":"Expected authority at index 7: file://","status-code":500,"stack-trace":
"java.lang.IllegalArgumentException: Expected authority at index 7: file:// ...etc
this.http.post('https://somecompany.atlassian.net/rest/auth/1/session' , body)
.subscribe(d => {
console.log(d);
this.router.navigate(['/home']);
},
error => {
console.log('errororororororor');
console.log(error);
});
}
You need to add headers on a proxy service using reverse proxy like nginx. I use docker to test with a reverse proxy service to add cross origin headers. Otherwise Jira doesn't allow it. At least not in Jira Cloud REST API. If you use Jira Server I believe you can whitelist apps through config/settings. The issue is actually browser side and you can use chrome plugin to disable the check but that's not advisable.
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.