zen of coding

Checking for SSL and then some…

A simple way to check and enforce SSL can be done by using the RequestHandler component. Here’s an example: [cc lang=”php”] private function checkHttps() { if(!$this->RequestHandler->isSSL()) { return $this->redirect(‘https://’ . env(‘SERVER_NAME’) . $this->here); } } [/cc] Simple enough, right? Yet there is a little caveat, which causes a problem in[…]

Read More »
%d bloggers like this: