middleware/mw.ssl.js
function init(ctx) {
        var server = ctx.server;
        server.ext('onRequest', checkIfSSL);
        return new Q(ctx);
    }
function init(ctx) {
        var server = ctx.server;
        server.ext('onRequest', checkIfSSL);
        return new Q(ctx);
    }
function init ( ctx ) { var server = ctx . server ; server . ext ( 'onRequest' , checkIfSSL ) ; return new Q ( ctx ) ; }
Add middleware for doing redirects
Add middleware for doing redirects