diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67283da..b0465d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,3 +91,10 @@ jobs: # were not committed with it, fails here. - name: Run tests run: php tests/run.php + + - uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Replay scanner report transport + run: node --test tests/ScannerReportTest.cjs diff --git a/README.md b/README.md index 5dd8e65..c849839 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,19 @@ Three rapid synthetic failed orders. The fourth checkout attempt refused. Separa 3. Upload the ZIP file and click **Install Now** 4. Activate the plugin +## Coverage on cached pages + +A cache can answer the page request before WebDecoy's PHP detection or crawler +counter runs. Supported WordPress caches expose an opt-in for known AI and search +crawlers on **WebDecoy → AI Traffic**. Use a WebDecoy edge sensor when an upstream +cache serves requests before WordPress. + +Cached pages can still report browser signals if the scanner script loads and +the site's same-origin `wp-admin/admin-ajax.php` accepts POST requests. If +WordPress rejects an expired scanner nonce, the scanner fetches a current one +and retries the report once. Keep this AJAX endpoint out of cache and purge +cached HTML after upgrading so it loads the updated scanner. + ## Development ### Prerequisites diff --git a/admin/partials/settings-page.php b/admin/partials/settings-page.php index e9d0d0e..a379467 100644 --- a/admin/partials/settings-page.php +++ b/admin/partials/settings-page.php @@ -926,6 +926,7 @@