POST requests from Confluence to JIRA always run GET requests instead.

I have set up CORS and can succesfully amke GET calls to JIRA. However, whenever I try to make a POST call it tries to run a GET call instead.

 

In the OPTIONS preflight request I look at my request headers and see "Access-Control-Request-Method: GET".

 

When I run the same POST call from other sites it works fine. Anyone know why this is happening?

1 answer

Hi Shaan,

One user ran into a similar issue and the findings were that JIRA will add its own Access-Control-Allow-Origin Header on GET and thus it would be doubled which could be happening in your situation.

Please see the answer Benjamin posted and hopefully that will help you make some headway into why this is happening and resolve this for you.  In addition please also review CONFSERVER-41269 to see if that helps as well as it states Confluence does not add the necessary header Access-Control-Allow-Origin.  There is a work around in the ticket that may be of assistance.

If CONFSERVER-41269 does help, please vote on the issue so you will be notified when the ticket is updated!

Cheers,

Branden

Neither of these seems like the answer. The cited user said that doubling would result in an "Only one Access-Control-Allow-Origin header is allowed on Response headers" error, which I don't have. 

Additionally, it doesn't seem to be a CORS issue as when I make the POST call from the developer console on a JIRA page I am still seeing a GET call in the request headers.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

753 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you