class OC_Request {
/**
* @brief Check overwrite condition
- * @returns true/false
+ * @returns bool
*/
- private static function isOverwriteCondition() {
+ private static function isOverwriteCondition($type = '') {
$regex = '/' . OC_Config::getValue('overwritecondaddr', '') . '/';
- return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1;
+ return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1
+ or ($type !== 'protocol' and OC_Config::getValue('forcessl', false));
}
/**