Is JIRA server blocking file:// protocol?

Is JIRA server blocking file:// protocol?

 

Currently, I'm developing an application made with Electron and Angular. Basically, with Electron, the application is under file:// protocol.

 

Now, I asked this question because when I tried to submit worklog using JIRA REST API. It gives me an error "Expected authority at index 7: file://". Other APIs with GET method work fine though.

 

Based on observation, GET method doesn't have Origin on the request header while, POST method has it. Origin is "file://"

 

With this, I suspected that JIRA is blocking file:// protocol.

 

Is there anything I can do to make this work? I should be able to submit worklog.

2 answers

This widget could not be displayed.

It's not "JIRA blocking", more that REST is usually implemented only over http/https, as file:// is not particularly useful for REST calls, and you'd have to write a whole other interface layer to expose it, rather than just go with the existing http(s) that comes automatically when running a web-service.

Hi mate,

What I mean is that, the application is not running on any server. Basically, it's not on http/https protocol. It's just reading the html file on my local machine so that why it's under file:// protocol.

However, the JIRA REST API that I'm trying to call is "https://xxyyzz.atlassian.net/rest/api/latest/issue/<Issue>/worklog" with POST method.

While my application is running under file:// protocol and then tried to call the API mentioned above, I get an error "Expected authority at index 7: file://". I think that when JIRA server received the request my application sent and found out that the origin is from file:// and not from http/https, it then rejected the request.

No, the REST API is simply a service that you call.  You're using an https POST to connect.  How you're doing that or where from is utterly irrelevant.

I suspect you're simply posting data in the wrong format.

This widget could not be displayed.

My issue has already been resolved but I still think that Jira server is rejecting request with file:// protocol on its origin header.

I say this because the way I resolved my issue is just changing the value of the origin header from file:// to my Jira base url - https://xxyyzz.atlassian.net

It's not "blocking" anything.  Your data was telling it to use the wrong protocol.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 16 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

42 views 1 0
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