Forum OpenACS Development: Re: Request Processor's rp_filter and AJAX

Collapse
Posted by Neophytos Demetriou on
I think having "X-Requested-With:XMLHttpRequest" header present is in the right direction. In that case, the API responds with a JSON response (instead of html) that says that the call did not succeed (possibly providing further info e.g. redirect url OR error code). Then, you handle the case in the frontend e.g. provide the user with a login box and so on. Just my 2 cents.
Collapse
Posted by Gustaf Neumann on
I think as well, that this is straightforward. it should be possible to set the header-field explicitly when needed.

Committed in: http://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-9%3Agustafn%3A20170628202027