Skip to content

Add global flag to disable Wave HTML view pages#1086

Open
gavinelder wants to merge 4 commits into
masterfrom
ge/feat/disable-html-views
Open

Add global flag to disable Wave HTML view pages#1086
gavinelder wants to merge 4 commits into
masterfrom
ge/feat/disable-html-views

Conversation

@gavinelder

Copy link
Copy Markdown
Contributor

Summary

Adds an installation-level configuration flag wave.views.enabled (default true) that lets operators globally turn off the HTML view pages Wave serves under /view/** — the build, mirror, scan, container, and inspect pages.

When wave.views.enabled=false, ViewController is not loaded (class-level @Requires), so the entire /view/** surface returns 404. Default behaviour is unchanged, so this is fully backward compatible.

Changes

  • ViewController: class-level @Requires(property = 'wave.views.enabled', value = 'true', defaultValue = 'true').
  • application.yml: documented default wave.views.enabled: true.
  • ViewControllerDisabledTest: asserts /view/** returns 404 when the flag is false.

Testing

  • New ViewControllerDisabledTest passes (4/4).
  • Existing ViewControllerTest is unchanged: the same 4 environment-dependent tests (inspect views and the scan-redirect) fail on both master and this branch, so no new failures are introduced by this change.

🤖 Generated with Claude Code

gavinelder and others added 2 commits July 16, 2026 16:00
Introduce an installation-level configuration flag 'wave.views.enabled'
(default true). When set to false, the HTML view pages served under
/view/** (builds, mirrors, scans, containers, inspect) are disabled
globally via a class-level @requires on ViewController, so the whole
/view surface returns 404. Default behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…/absence

Add ViewControllerEnabledTest asserting the ViewController bean is loaded
when wave.views.enabled=true, and assert bean absence in the disabled test,
so the flag is verified in both directions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gavinelder
gavinelder marked this pull request as ready for review July 16, 2026 15:07
gavinelder and others added 2 commits July 16, 2026 16:27
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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