mercredi 3 juin 2015

How do I spoof the referrer for all requests made from a site routed through a browser-sync proxy?

How do I spoof the referrer for all requests made from a site routed through a browser-sync proxy?

I want requests to google maps api and others to appear to come from my actual domain and not the proxy server that browser-sync sets up.

module.exports = {

    "server": false,
    proxy: {

    target: "http://ift.tt/1IhvcDg",
    reqHeaders: function (config) {

       return {
                "host": config.urlObj.host,
                "referer": "my.websitename.com",
            };

    }


},
    "port": 3000,
    "ghostMode": {
        "clicks": true,
        "scroll": true,
        "location": false,
        "forms": {
            "submit": true,
            "inputs": true,
            "toggles": true
        }
    },
    "logLevel": "info",
    "logPrefix": "BS",
    "logConnections": false,
    "logFileChanges": true,
    "logSnippet": true,
    "open": "external",
    "browser": "default",
    "xip": false,
    "hostnameSuffix": false,
    "notify": true,
    "scrollProportionally": true,
    "scrollThrottle": 0,
    "reloadDelay": 0,
    "injectChanges": true,
    "startPath": null,
    "minify": true,
    "host": null,
    "codeSync": true,
    "timestamps": true,
    "socket": {
        "path": "/browser-sync/socket.io",
        "clientPath": "/browser-sync",
        "namespace": "/browser-sync"
    },
    "debugInfo": true
};

Aucun commentaire:

Enregistrer un commentaire