Skip to content

HTML minification is not working when control panel has been disabled #3

@o1y

Description

@o1y

When the control panel is disabled with $control_panel = false; the HTML minification is not working at all. I think could be fixed by checking if CP_ROUTE has been defined in the isNotControlPanel function. https://github.com/4rn0/statamic-minifyhtml/blob/master/MinifyHTML/MinifyHTMLMiddleware.php#L73

protected function isNotControlPanel()
    {
        if (!CP_ROUTE) {
            return true;
        }

        return !request()->is( CP_ROUTE . '*');
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions