I am using the security component from app_controller. In some
controllers I have this in my beforeFilter:

        if (in_array($this->params['action'], $action)):
                $this->Security->blackHoleCallback = 'forceSSL';
                $this->Security->requireSecure();
        else:
                $this->Security->blackHoleCallback = 'unforceSSL';
        endif;

I have these two functions in app_controller:

        function forceSSL() {

                $this->redirect('https://' . env('SERVER_NAME') . $this->here);

        }

        function unforceSSL() {

                $this->redirect('http://' . env('SERVER_NAME') . $this->here);

        }

This is working in the sense that the right actions in the right
controllers are being redirected to https. But once I am in https, I
stay there.

My question is: how do I get the site to go back to http for those
controller actions that do not require https?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to