Skip to content

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

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 . '*');
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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