I have a web application built with angular 8 , I am trying to use http post to call JIRA rest API to create an issue from my application, when I use http get, i can successfully get the issue from JIRA api, but post method always give error: XSRF check failed even I set header "X-Atlassian-Token" as 'no-check'.
Even tried to set "jira.xsrf.enabled" as false in jira-application.properties
I am using Basic authentication as I am trying to use bot to create jira issue.
Hi @wenting liu ,
Based on this documentation you need to add a header like so.
X-Atlassian-Token: no-check
https://developer.atlassian.com/server/jira/platform/form-token-handling/
Hi, I know this is a very old issue but I just stumbled upon this problem as well and I thought I might be able to help people with the same issue. In our case, there were two possible solutions.
- Change User Agents Header (Not possible as far as I know in chrome)
- Whitelist/Allowlist the origin domain in Jira. When you send a request to the Jira API your browser automatically populates the "origin" header. You need to add that value to the whitelist/allowlist in Jira. -> See here Configuring the allowlist | Jira | Atlassian Documentation
Type "Domain" should work.
See the issue documented by Atlassian:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.