将其他Cookie添加到ReactiveBase

时间:2018-10-29 20:22:22

标签: reactivesearch

我尝试连接的elastic-search位于代理后面,该代理需要添加一些身份验证cookie。

根据此postbeforeSend应该可以解决。

但是我正在使用此"@appbaseio/reactivesearch": "^2.12.1",

因此,beforeSend更改为transformRequest。 我将以下代码添加到了ReactiveBase中。

                    transformRequest={(abc) => {
                        console.log('please come here');
                        console.log({abc});
                        return {
                            ...abc,
                            credentials: 'include',
                        };
                    }}

但是我没有在控制台中看到任何东西。这是否意味着该功能未触发?

其他问题:为什么Chrome dev-tools在网络标签中显示此Provisional headers are shown

0 个答案:

没有答案