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);
            }
        }
    }