api request using basic auth returning html with title: access to the site is blocked

Nika Lagurashvili December 12, 2018

i am using basic authorization. when i am making request from home computer everything works fine but on the developer environment it returns that html. after making some changes in the code it now returns 404 not found,but on the home computer exact same code work fine.Could it be that because of some security systems in my company (which ones i don't know exactly firewall and maybe proxy) Basic authorization doesn't work?

1 answer

0 votes
Prakhar Srivastav {Appfire}
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.
December 12, 2018

@Nika Lagurashvili

Is your JIRA behind some proxy server? Proxy servers can eat the basic auth credentials.

If that's the case, then you need to initialise session using POST request to /rest/auth/1/session: https://docs.atlassian.com/jira/REST/latest/#idp1478624 After doing that you can use REST as logged in user if you pass session cookies properly.

 

Regards

Prakhar

Suggest an answer

Log in or Sign up to answer