I have followed following "Getting Started" document to write cloud app to JIRA.
https://developer.atlassian.com/cloud/jira/platform/getting-started/
However, at the runtime it renders "Hello World" but it also has several "WARN" messages "RPC: request rejected (bad origin)". I have added following javascript snippet to the Hello World app to read the current jira issue key and I guess it is not working (returns null) due to the bad origin error but not sure.
var key = document.getElementById('key-val').getAttribute('data-issue-key');
I would like to know,
1. if "RPC: request rejected (bad origin)" is normal and can I start adding functionality?
2. What is the best way to obtain current jira issue from cloud app (Atlassian Connect JavaScript API)?
Thanks in advance.