title: Access-Control-Allow-Origin Error..(using cordova)
body: <p>I'm trying to web server and client..(Hybrid app! using cordova)
  But Access-Control-Allow-Origin error..so I downloaded chrome extension program cors.. but doesn't working..</p>
  
  <p>[server.js]</p>
  
  <pre><code>var app = require('express')();
  var http = require('http').Server(app);
  var cors = require('cors');
  var io = require('socket.io')(http);
  
  // io.set('origins','*:*');
  
  io.on('connection', function(socket){
    console.log('a user connected');
    socket.on('weather_location', function(msg){
      socket.emit('message', msg);
    })
  });
  
  http.listen(80, function(){
    console.log('listening on *:3737');
  });
  </code></pre>
  
  <p>[index.html]</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no"&gt;
  &lt;meta http-equiv="Access-Control-Allow-Origin" content="*"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;location_weather&lt;/title&gt;
      &lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"&gt;&lt;/script&gt;
      &lt;!-- &lt;script type='text/javascript' src='/socket.io/socket.io.js'&gt;&lt;/script&gt;   --&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.0/socket.io.slim.js"/&gt;
      &lt;!-- &lt;script type="text/javascript" src="./js/socket.io.js"/&gt; --&gt;
      &lt;script type="text/javascript" src="https://openapi.map.naver.com/openapi/v3/maps.js?clientId=irru1vaga0dOPnfgy29o&amp;submodules=geocoder"&gt;&lt;/script&gt;  
   &lt;!--    &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 ws://example.com wss://example.com"&gt; --&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;button id="weatherBtn" onclick="weather_location();"&gt;클릭&lt;/button&gt;
  &lt;/body&gt;
  
  &lt;/html&gt; 
  
  
  &lt;script&gt;
      var socket = io.connect('http://202.31.200.138:80');
      //var socket = io();ttp
      $(function (){
          //var socket = io.connect('http://202.31.200.138:3330');
  
          socket.on('message', function(data){
              console.log(data);
              alert(data);
          });
  
      });
  
      function weather_location(){
          alert("hello");
          socket.emit('weather_location','message');
      }
      // function location_weather(){
      //  if(navigator.geolocation){
      //      navigator.geolocation.getCurrentPosition(function(position){
      //          alert("위도 : " + position.coords.latitude + "tt" + position.coords.longitude);
      //      }, function(error){
      //          console.error(error);
      //      },{
      //          enableHighAccuracy : false, 
      //          maximumAge : 0, 
      //          timeout : Infinity
      //      });
      //      socket.emit('weather_location',position.coords.latitude );
      //  } else {
      //      alert("GPS를 지원하지 않습니다.");
      //  }
  
      //      //return false;
      // }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>[error]</p>
  
  <p>The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'null' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.</p>
  
  <p>Please Help me...</p>