original_string: public function handleSslRouting()
      {
          if ($this->settings->sslRoutingEnabled && !Craft::$app->getRequest()->getIsConsoleRequest())
          {
              $requestedUrl   = Craft::$app->request->getUrl();
              $restrictedUrls = $this->settings->sslRoutingRestrictedUrls;
  
              if (!Craft::$app->request->isSecureConnection)
              {
                  foreach ($restrictedUrls as $restrictedUrl)
                  {
                      // Parse dynamic variables like /{cpTrigger}
                      if (stripos($restrictedUrl, '{') !== false)
                      {
                          $restrictedUrl = Craft::$app->view->renderObjectTemplate(
                              $restrictedUrl,
                              $this->getDynamicParams()
                          );
                      }
  
                      $restrictedUrl = '/'.ltrim($restrictedUrl, '/');
  
                      if (stripos($requestedUrl, $restrictedUrl) === 0)
                      {
                          $this->forceSsl();
                      }
                  }
  
                  return true;
              }
          }
  
          return false;
      }
code: public function handleSslRouting()
      {
          if ($this->settings->sslRoutingEnabled && !Craft::$app->getRequest()->getIsConsoleRequest())
          {
              $requestedUrl   = Craft::$app->request->getUrl();
              $restrictedUrls = $this->settings->sslRoutingRestrictedUrls;
  
              if (!Craft::$app->request->isSecureConnection)
              {
                  foreach ($restrictedUrls as $restrictedUrl)
                  {
                      // Parse dynamic variables like /{cpTrigger}
                      if (stripos($restrictedUrl, '{') !== false)
                      {
                          $restrictedUrl = Craft::$app->view->renderObjectTemplate(
                              $restrictedUrl,
                              $this->getDynamicParams()
                          );
                      }
  
                      $restrictedUrl = '/'.ltrim($restrictedUrl, '/');
  
                      if (stripos($requestedUrl, $restrictedUrl) === 0)
                      {
                          $this->forceSsl();
                      }
                  }
  
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function handleSslRouting ( ) { if ( $ this -> settings -> sslRoutingEnabled && ! Craft :: $ app -> getRequest ( ) -> getIsConsoleRequest ( ) ) { $ requestedUrl = Craft :: $ app -> request -> getUrl ( ) ; $ restrictedUrls = $ this -> settings -> sslRoutingRestrictedUrls ; if ( ! Craft :: $ app -> request -> isSecureConnection ) { foreach ( $ restrictedUrls as $ restrictedUrl ) { // Parse dynamic variables like /{cpTrigger} if ( stripos ( $ restrictedUrl , '{' ) !== false ) { $ restrictedUrl = Craft :: $ app -> view -> renderObjectTemplate ( $ restrictedUrl , $ this -> getDynamicParams ( ) ) ; } $ restrictedUrl = '/' . ltrim ( $ restrictedUrl , '/' ) ; if ( stripos ( $ requestedUrl , $ restrictedUrl ) === 0 ) { $ this -> forceSsl ( ) ; } } return true ; } } return false ; }
docstring: Forces SSL based on restricted URLs
  The environment settings take priority over those defined in the control panel
  
  @return bool
  
  @throws ErrorException
  @throws \yii\base\Exception
  @throws \yii\base\InvalidConfigException
docstring_tokens: Forces SSL based on restricted URLs The environment settings take priority over those defined in the control panel