Skip to content

Turn Laravel Boost on only in the local environment - #574

Merged
rbruhn merged 1 commit into
developmentfrom
boost-local-only
Oct 17, 2026
Merged

rbruhn merged 1 commit into
developmentfrom
boost-local-only

Conversation

@rbruhn

@rbruhn rbruhn commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Turns Laravel Boost off everywhere except local.

Why

Development pages logged "Browser logger active (MCP server detected). Posting to: https://dev.biospex.org/_boost/browser-logs". Boost's own check turns it on when the environment is local or APP_DEBUG is true. Development installs dev packages (deploy/custom.php skips --no-dev there, which is also how it gets Debugbar) and runs with APP_DEBUG=true, so Boost injected its browser logger and registered its /_boost/... routes. Production was not affected: APP_DEBUG=false, and Boost isn't installed there.

Change

  • Publishes config/boost.php (unchanged from the package) except 'enabled' => env('BOOST_ENABLED', env('APP_ENV') === 'local'). Boost now runs only where APP_ENV=local; setting BOOST_ENABLED still overrides it.
  • Development has no BOOST_ setting in its environment, so it gets the new default.

Tested locally

  • New tests/Feature/BoostConfigTest.php: local → on, development and production → off, and BOOST_ENABLED=true overrides the default. 4 passed.
  • Locally php artisan config:show boost.enabled is still true (APP_ENV=local), so the MCP tools keep working.

To verify on development

See #573.

Boost enables itself wherever APP_DEBUG is true, so the development server, which installs dev packages and runs with debug on, injected Boost's browser logger and served its routes. The published config now defaults boost.enabled to APP_ENV=local; BOOST_ENABLED still overrides it.
@rbruhn
rbruhn merged commit 38ef64c into development Oct 17, 2026
2 checks passed
@rbruhn
rbruhn deleted the boost-local-only branch October 17, 2026 20:54
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.

1 participant