Skip to content

chore: add local to WP_ENV check for local users (acato)#43

Merged
YvetteNikolov merged 1 commit into
mainfrom
feat/add-local-dev-env
Jul 6, 2026
Merged

chore: add local to WP_ENV check for local users (acato)#43
YvetteNikolov merged 1 commit into
mainfrom
feat/add-local-dev-env

Conversation

@YvetteNikolov

@YvetteNikolov YvetteNikolov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Voor 'local' is Local by Flywheel conventie

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CSP configuration to treat WP_ENV=local the same as WP_ENV=development, aligning with Local by Flywheel conventions so local users get the development-only CSP relaxations (e.g., for Vite/react-refresh).

Changes:

  • Extend the WP_ENV check from only development to development and local.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Basic.php
Comment on lines 271 to +272
// Only on development environments
if (defined('WP_ENV') && WP_ENV === 'development') {
if (defined('WP_ENV') && in_array(WP_ENV, ['development', 'local'], true)) {
@YvetteNikolov YvetteNikolov merged commit 0078701 into main Jul 6, 2026
3 checks passed
@YvetteNikolov YvetteNikolov deleted the feat/add-local-dev-env branch July 6, 2026 15:07
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.

3 participants