private function checkSecure() {
        $environment = $this->app->environment;
        $scheme = $environment["slim.url_scheme"];

        if ("https" !== $scheme && true === $this->options["secure"]) {
            if (!in_array($environment["SERVER_NAME"], $this->options["relaxed"])) {
                $message = sprintf(
                        "Insecure use of middleware over %s denied by configuration.", strtoupper($scheme)
                );
                throw new \RuntimeException($message);
            }
        }
    }
private function checkSecure() {
        $environment = $this->app->environment;
        $scheme = $environment["slim.url_scheme"];

        if ("https" !== $scheme && true === $this->options["secure"]) {
            if (!in_array($environment["SERVER_NAME"], $this->options["relaxed"])) {
                $message = sprintf(
                        "Insecure use of middleware over %s denied by configuration.", strtoupper($scheme)
                );
                throw new \RuntimeException($message);
            }
        }
    }
private function checkSecure ( ) { $ environment = $ this -> app -> environment ; $ scheme = $ environment [ "slim.url_scheme" ] ; if ( "https" !== $ scheme && true === $ this -> options [ "secure" ] ) { if ( ! in_array ( $ environment [ "SERVER_NAME" ] , $ this -> options [ "relaxed" ] ) ) { $ message = sprintf ( "Insecure use of middleware over %s denied by configuration." , strtoupper ( $ scheme ) ) ; throw new \ RuntimeException ( $ message ) ; } } }
HTTP allowed only if secure is false or server is in relaxed array.
@throws \RuntimeException
HTTP allowed only if secure is false or server is in relaxed array .