Guest User

Untitled

a guest
Dec 15th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Request.onload = answer;
  2. Request.open("post", "https://xxx.php", false);
  3. Request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");
  4. Request.send(forSend);
  5.  
  6. header('Content-Type: application/json');
  7. header('X-Content-Type-Options nosniff');
  8. header('Access-Control-Allow-Origin: *');
  9. header('Access-Control-Allow-Methods: POST');
  10. header('Access-Control-Allow-Headers: Content-Type');
  11. header('Access-Control-Allow-Credentials: true');
  12.  
  13. Failed to load https://xxx.php: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
  14. Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://xxx.php'.
Add Comment
Please, Sign In to add comment