title: Ajax request in cordova application's
body: <p>I'm using cordova.I want to use $.ajax jquery request in my app.This is my "Content-Security-Policy" meta tag :</p>
  
  <pre><code>&lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; connect-src 'self' http://localhost"&gt;
  </code></pre>
  
  <p>I have a link in my app :</p>
  
  <pre><code>&lt;div data-role="page" id="login_page" data-theme="a" &gt;
              &lt;div data-role="main" class="ui-content"&gt;
                          &lt;button data-role="button" id="get_web_data" data-&gt;icon="lock" data-transition="fade" &gt;Get Web data&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt; &lt;script type="text/javascript" src="js/jquery_2.1.1.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="rtl-jquery-mobile-master/js/rtl.jquery.mobile-1.4.0.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And this is my jquery code :</p>
  
  <pre><code> $('#get_web_data').on('tap',function(){
          $.ajax({
              url:'http://localhost/test.php',
              type:'GET',
              data:{'user_name':'amir','password':'123'},
              dataType:'json',
              success:function(data){
                  alert(data);
              },
              error:function(error){alert('Error');}
          }) ;
       });
  </code></pre>
  
  <p>After click on the link I see this error :</p>
  
  <blockquote>
    <p>index.html:1 Failed to load
    <a href="http://localhost/test.php?user_name=amir&amp;password=123" rel="nofollow noreferrer">http://localhost/test.php?user_name=amir&amp;password=123</a>: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="http://localhost:8000" rel="nofollow noreferrer">http://localhost:8000</a>' is therefore not allowed
    access.</p>
  </blockquote>
  
  <p>Where is my problem ?</p>