Welcome Guest, Not a member yet? Register   Sign In
Access-Control-Allow-Origin for Toolbar (multidomain website)
#1

Hi,
I would like to suggest adding Access-Control-Allow-Origin header option for debugbar/toolbar, so if you are developing multidomain website, it shows debugbar also on sites with other domain(s).
Simply adding this code to Toolbar.php does the trick, but for proper use, there should be setting in Config/App.php with list of domains from which this script would generate headers.

Code:
        // Otherwise, if it includes ?debugbar_time, then
        // we should return the entire debugbar.
        if ($request->getGet('debugbar_time')) {
            helper('security');
            header('Access-Control-Allow-Origin: http://[domain]'); //ADDED
Reply




Theme © iAndrew 2016 - Forum software by © MyBB