Browsersync with Windows Authentication Browsersync with Windows Authentication windows windows

Browsersync with Windows Authentication


This should work. The middleware part will pass the relevant headers from the original request to 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();            }        }});