This seems to be a better way to do this... See below

The modx option server_protocol can actually be blank (without a value.) and so we should probably check to ensure that it's not empty first, and then set a default. Defining the default as https should solve problems. Honestly, the https overhead in this case wouldn't be extreme.