Skip to content

Fix Page Scanner URL host resolution for traditional pages in UVE#35649

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-page-scanner-url
Draft

Fix Page Scanner URL host resolution for traditional pages in UVE#35649
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-page-scanner-url

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

Proposed Changes

Traditional pages were sending scanner URLs as admin-origin + path, which made same-path pages across different hosts indistinguishable and produced reports for the wrong page. This update makes scanner URL construction host-aware for traditional pages while preserving headless behavior.

  • Host resolution logic
    • Updated getRequestHostName to resolve in this order:
      1. params.clientHost (headless, unchanged)
      2. page site.hostname (traditional pages)
      3. window.location.origin fallback
  • Scanner entrypoint wiring
    • Updated DotEmaShellComponent $seoParams to pass pageAsset.site.hostname into host resolution so both Geo and A11y scanner flows receive the correct page host.
  • Focused coverage
    • Added/updated unit tests for:
      • clientHost precedence
      • hostname-only and full-URL hostname handling
      • fallback behavior
      • $seoParams.requestHostName on traditional pages (no clientHost)
const requestHostName = getRequestHostName(
  this.uveStore.pageParams(),
  this.uveStore.pageAsset()?.site?.hostname
);
const pageUrl = `${requestHostName}${currentUrl ?? '/'}`;

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

Security/trust boundaries are unchanged: backend proxy behavior is the same; this PR corrects frontend URL selection so scanner requests target the actual edited page host for traditional pages.

Screenshots

Original Updated
N/A (network payload behavior change) N/A (network payload behavior change)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • opencollective.com
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/core/core/core-web/node_modules/document-register-element/node_modules/.bin/lightercollective /home/REDACTED/work/core/core/core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix Page Scanner URL for traditional pages Fix Page Scanner URL host resolution for traditional pages in UVE May 11, 2026
Copilot AI requested a review from fmontes May 11, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Page Scanner sends the wrong URL for traditional pages — uses admin origin instead of the page's host

2 participants