-2

I have to make a request to the Jira sever, i have used angular Js and html. I am getting the following error

XMLHttpRequest cannot load https://jira.atlassian.com/rest/api/2/project. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

I cant change any server settings. How can i enable Access-Control-Allow-Origin.

I have added SimpleCORSFilter.java file. Still problem is not solved.

When i just take the URL, Json response is dispalyed. when called the URL using Angular JS above error is showing up.

Thanks in advance.

  • 1
    You can't enable Access-Control-Allow-Origin if you can't change any server settings. – Quad Sep 09 '15 at 12:29
  • You can't ... please google the error. You will find volumes of information about cors – charlietfl Sep 09 '15 at 12:30
  • 1
    possible duplicate of [Ways to circumvent the same-origin policy](http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy) – Quentin Sep 09 '15 at 12:34

1 Answers1

0

Well you can't really control it from your side, that's the whole point.

Look at this answer. The response from the server must return the Access-Control-Allow-Origin header. So... talk with your server dudes.

Community
  • 1
  • 1
Yoni Levy
  • 1,562
  • 2
  • 16
  • 35
  • Is it not possible using any of SimpleCORSFilter files? – Bhavya Nayak Sep 15 '15 at 10:04
  • I assume it should help since it's on the server side, but I see you're still not getting the desired outcome so you must provide more of your code. I looked at some related angular+cors questions here which can provide help but you must share more code before – Yoni Levy Sep 15 '15 at 11:03