Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带Windows身份验证的Browsersync_Windows_Authentication_Browser Sync - Fatal编程技术网

带Windows身份验证的Browsersync

带Windows身份验证的Browsersync,windows,authentication,browser-sync,Windows,Authentication,Browser Sync,我正在.NET应用程序中使用Browsersync。我将iis设置为仅使用Windows身份验证(禁用匿名身份验证)。我得了402.1分。当然,我可以将anonymous设置为enabled,它将加载页面,但我将使用anonymous,这不是期望的结果。我不太确定在Browsersync中设置什么选项才能使其在Windows身份验证模式下工作 我正在使用下面的内容,并认为这是由于不正确的标题 browserSync.init({ proxy: { targ

我正在.NET应用程序中使用Browsersync。我将iis设置为仅使用Windows身份验证(禁用匿名身份验证)。我得了402.1分。当然,我可以将anonymous设置为enabled,它将加载页面,但我将使用anonymous,这不是期望的结果。我不太确定在Browsersync中设置什么选项才能使其在Windows身份验证模式下工作

我正在使用下面的内容,并认为这是由于不正确的标题

browserSync.init({
        proxy: {
            target: 'http://localhost:4300',
            reqHeaders: {
                "host": config.urlObj.host,
                "accept-encoding": "identity",
                "agent": false
            }
        }
    });

这应该行得通。
中间件
部分将把原始请求中的相关头传递给IIS

browserSync.init({
        proxy: {
            target: 'http://localhost:4300',
            reqHeaders: {
                "accept-encoding": "identity",
                "agent": false
            },
            middleware: function (req, res, next) {
                if (req.headers.x-logon-user) {
                    res.setHeader("X-Logon-User", req.headers.x-logon-user);
                }
                if (req.headers.authorization) {
                    res.setHeader("Authorization", req.headers.authorization);
                }
                next();
            }
        }
});

对此有任何更新吗?看起来没有更新。有人能找到答案吗?