jquery - Detecting XHR CORS request in Grails -


i'm attempting cross-origin requests against grails (2.0.1) application. have grails cors pluging installed. using jquery.

how can detect xhr request? under conventional same domain ajax workflow use request.xhr object, returns false cors. other headers of request same standard call:

host, connection, content-length, cache-control, pragma, accept, origin, user-agent, content-type, dnt, referer, accept-encoding, accept-language, accept-charset, cookie

i need know if request xhr because returned content different.

you should use origin header. origin header added browsers on xhr requests. unlikely non-browser-based source include header on request.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -