Code check site curent protocol (HTTP || HTTPS) and set params accordingly