Skip to main content
Participant
May 18, 2018
Question

xhr from html page served by node

  • May 18, 2018
  • 0 replies
  • 298 views

If I start an http server and direct the CEP plugin to load a page like the one below served by that server, will the script below work? I am seeing the XHR request hang every time. The same thing works as expected in plain node.

<!doctype html>

<html>

<head>

  <script type="text/javascript">

  var http = new XMLHttpRequest();

  http.open('GET', '/token');

  http.setRequestHeader("x-token", window.location.hash);

  http.send(null);

  </script>

</head>

<body>

</body>

</html>

This topic has been closed for replies.