formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Cookies not sent during request

Open Aiso786 opened this issue 9 years ago • 1 comments

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');

Aiso786 avatar Apr 19 '17 14:04 Aiso786

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.

Aiso786 avatar Dec 11 '17 13:12 Aiso786