Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set useForAllRequests to true, closes: https://github.com/craftpulse/craft-password-policy/issues/34 #35

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

khalwat
Copy link
Contributor

@khalwat khalwat commented Jan 7, 2025

This PR sets useForAllRequests to true, in ServicesTrait, closes: #34

As per the code:

        // The Vite service is generally only needed for CP requests & previews, save a db write, see:
        // https://github.com/nystudio107/craft-plugin-vite/issues/27
        $request = Craft::$app->getRequest();
        if (!$this->useForAllRequests && !$request->getIsConsoleRequest()) {
            if (!$request->getIsCpRequest() && !$request->getIsPreview() && !in_array($request->getSegment(1), $this->firstSegmentRequests, true)) {
                return;
            }
        }

...by default craft-plugin-vite only works for CP requests. You can override this via the setting above. This was added to address this issue: nystudio107/craft-plugin-vite#27

@michtio michtio merged commit 972bae2 into craftpulse:develop-v5 Jan 7, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants