lib/collection/proxy-config.js
function (protocols) {
        if (!protocols) {
            return;
        }

        var updatedProtocols,
            hostAndPath = _.split(this.match.pattern, PROTOCOL_HOST_SEPARATOR)[1];

        if (!hostAndPath) {
            return;
        }

        updatedProtocols = _.intersection(ALLOWED_PROTOCOLS, _.castArray(protocols));
        _.isEmpty(updatedProtocols) && (updatedProtocols = ALLOWED_PROTOCOLS);

        this.match.update({
            pattern: updatedProtocols.join(PROTOCOL_DELIMITER) + PROTOCOL_HOST_SEPARATOR + hostAndPath
        });
    }
function (protocols) {
        if (!protocols) {
            return;
        }

        var updatedProtocols,
            hostAndPath = _.split(this.match.pattern, PROTOCOL_HOST_SEPARATOR)[1];

        if (!hostAndPath) {
            return;
        }

        updatedProtocols = _.intersection(ALLOWED_PROTOCOLS, _.castArray(protocols));
        _.isEmpty(updatedProtocols) && (updatedProtocols = ALLOWED_PROTOCOLS);

        this.match.update({
            pattern: updatedProtocols.join(PROTOCOL_DELIMITER) + PROTOCOL_HOST_SEPARATOR + hostAndPath
        });
    }
function ( protocols ) { if ( ! protocols ) { return ; } var updatedProtocols , hostAndPath = _ . split ( this . match . pattern , PROTOCOL_HOST_SEPARATOR ) [ 1 ] ; if ( ! hostAndPath ) { return ; } updatedProtocols = _ . intersection ( ALLOWED_PROTOCOLS , _ . castArray ( protocols ) ) ; _ . isEmpty ( updatedProtocols ) && ( updatedProtocols = ALLOWED_PROTOCOLS ) ; this . match . update ( { pattern : updatedProtocols . join ( PROTOCOL_DELIMITER ) + PROTOCOL_HOST_SEPARATOR + hostAndPath } ) ; }
Updates the protocols in the match pattern

@param {Array.<String>} protocols The array of protocols
Updates the protocols in the match pattern