javascript - Setting cors headers in the client side -


i making http long poll request using example https://github.com/rstoyanchev/spring-mvc-chat/blob/7c474fea5638dc70660fb6029ad891ae92e41801/src/main/webapp/resources/js/chat.js

the server hosted in port 7555 , browser needs 80. when run it, no access control headers error. not have chance set cors headers in server need on client side. trying develop curl php script, not work (give error 500) here is:

 <?php  error_reporting(e_all);  ini_set('display_errors', '1');   $ch = curl_init();   curl_setopt($ch, curlopt_url, "http://localhost:7555/test?list=0");  curl_setopt($ch, curlopt_returntransfer, true);  curl_setopt($ch, curlopt_port, 7555);   curl_setopt($ch, curlopt_timeout, 10);   $out = curl_exec($ch);   curl_close($ch);   echo $out;   ?> 

how can past cors client side?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -