formio.js
formio.js copied to clipboard
Cookies not sent during request
Hello,
When a request is made by formio (to get the values of a "select" component for example), the "Cookies" HTTP header is not sent.
This is causing issues because we need an information from the cookies to authenticate the request.
Can you help us please ?
I have to tried to play the "Plugin Hooks" but i haven't managed to get it working. Here is what our code looks like:
let DelayPlugin = {
priority: 1,
request: function (requestArgs) {
console.log(requestArgs);
}
}
Formio.registerPlugin(DelayPlugin, 'delay');
I managed to get it working
const plugin = {
priority: 0,
requestOptions: function (value) {
value.credentials = 'include';
return value;
}
};
FormioCore.registerPlugin(plugin, 'enableCredentials');
I close the issue.