[Question] Possibilities for customizing headers and/or cookies
I'm in a situation, using the opensource edition, where there is a reverse proxy between the frontend and formio backend. And this reverse proxy has some additional authorization to do.
When using, e.g., a <formio> element, I need some way for it to either:
- send the 'Authorization' header with my supplied value
- or some other custom header with said value
- or have cookies sent by having the withCredentials=true be passed to the XHR call.
(Preferably option 3)
I've dug into the code enough to know that this is probably a function of formiojs, if it's at all possible. i.e. it doesn't appear to be using Angular's HttpClient, so an HttpInterceptor will have no effect.
If the suggestion is to manipulate the formio.js object, then please describe how to do that (e.g. by injecting my own FormioService or FormioPromiseService and what to do in it)? I think I'm seeing it create a new Formio(js) instance for each <formio> element. Thus, each instance would have to be manipulated. And I'm not even sure how to actually get at the instance of Formio(js) that a particular <formio> element would possess.
Thanks in advance!