Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is JIRA server blocking file:// protocol?

Steven Lee July 26, 2017

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

1 vote
Steven Lee August 2, 2017 edited

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

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2017

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

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2017

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.

Steven Lee July 27, 2017 edited

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.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2017

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.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, aafp, jira migration, marketing collaboration, end siloed work, streamline workflows, kerrie gottschalk, jira cloud admins, unified marketing, process visibility, team efficiency, cross-team collaboration

How Kerrie Gottschalk unified AAFP’s marketing team with Jira

At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.

Read the story
AUG Leaders

Atlassian Community Events