• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

xhr from html page served by node

New Here ,
May 18, 2018 May 18, 2018

Copy link to clipboard

Copied

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>

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation