# Need help with CORS and ionic 2

**URL:** <https://forum.ionicframework.com/t/need-help-with-cors-and-ionic-2/70066>\
**Category:** ionic-v3\
**Created:** [November 13, 2016, 10:27pm UTC](https://forum.ionicframework.com/t/need-help-with-cors-and-ionic-2/70066 "2016-11-13T22:27:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samikoren1](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@samikoren1](https://forum.ionicframework.com/u/samikoren1)\
**Post date:** [November 13, 2016, 10:27pm UTC](https://forum.ionicframework.com/t/need-help-with-cors-and-ionic-2/70066/1 "2016-11-13T22:27:15Z")

</div>

I read all the suggestions and also followed the ionic suggestion how to overcome the CORS issue and get rid of the error: “Access-Control-Allow-Origin” with no success. I think I am missing the exact path conversion in proxies:

The url I am trying to access in firebase is: [https://firebasestorage.googleapis.com/v0/b/Test1-xxxxx.appspot.com/o/userData](https://firebasestorage.googleapis.com/v0/b/Test1-xxxxx.appspot.com/o/userData).

My local host is: localhost:8100.

I don’t understand how should I edit the path and proxyUrl in ionic.config.json:

{

“name”: “Test1”, “app\_id”: “”, “v2”: true, “typescript”: true,

“proxies”: [{  
“path”: “…”,

“proxyUrl”: “…”

}]}

code looks like this:  
firebase\_storage\_Ref.child(path/title).getDownloadURL().then(function(url) {  
var xmlhttp = new XMLHttpRequest();  
xmlhttp.onreadystatechange = function() {  
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {  
var response = xmlhttp.responseText; // should have text here with no success  
}  
};  
xmlhttp.open(“GET”, url, true);  
xmlhttp.send();

I have tried many ways with no success, I am probably missing the point. I am new to Apps in general. I am starting with Web app using angular2+Ionic2 Thanks for any help.

---

<div class="post-metadata">

**Author:** ![vaibsVB](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vaibsvb/32/102515_2.png) [@vaibsVB](https://forum.ionicframework.com/u/vaibsVB)\
**Post date:** [November 14, 2016, 6:06am UTC](https://forum.ionicframework.com/t/need-help-with-cors-and-ionic-2/70066/2 "2016-11-14T06:06:21Z")

</div>

Follow this answer, check whether this work for you or not.

> [@Ionic 2 CORS issue](https://forum.ionicframework.com/t/ionic-2-cors-issue/59815/2):
>
> Try this link that might helps you. (if you are working on MAC machine) or this (if you are working on windows machine)

---

<div class="post-metadata">

**Author:** ![samikoren1](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@samikoren1](https://forum.ionicframework.com/u/samikoren1)\
**Post date:** [November 15, 2016, 3:49pm UTC](https://forum.ionicframework.com/t/need-help-with-cors-and-ionic-2/70066/3 "2016-11-15T15:49:52Z")

</div>

Thanks for your answer, I was able to get my data with proxies settings according to help I got from Volodymyr Bilyachat on stackoverflow. Here is the solution that helped me:

> <https://stackoverflow.com/questions/40576037/cors-with-firebaseionic2angularjs-no-access-control-allow-origin-still-exis>
