Adding SSL/non-SSL switch in broker.js