Guest User

Untitled

a guest
Jun 8th, 2014
2,693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. Request URL:http://localhost:9000/login
  2. Request Headers CAUTION: Provisional headers are shown.
  3. Accept:application/json, text/plain, */*
  4. Content-Type:application/json;charset=UTF-8
  5. Origin:http://localhost:8000
  6. Referer:http://localhost:8000/app.html
  7. User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
  8. Request Payloadview source
  9. {userName:foo, password:bar}
  10.  
  11. def checkPreFlight = Action {
  12. println("in CORS `checkPreFlight`")
  13. Ok("...").withHeaders(
  14. ACCESS_CONTROL_ALLOW_ORIGIN -> "*",
  15. ACCESS_CONTROL_ALLOW_METHODS -> "POST",
  16. ACCESS_CONTROL_MAX_AGE -> "300",
  17. ACCESS_CONTROL_ALLOW_HEADERS -> "Origin, X-Requested-With, Content-Type, Accept, Referer, User-Agent")
  18. }
  19.  
  20. XMLHttpRequest cannot load http://localhost:9000/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
Advertisement
Add Comment
Please, Sign In to add comment