Adds automatic domain validation and allow-listing#2092
Open
bs-shobhitkumar wants to merge 29 commits intomasterfrom
Open
Adds automatic domain validation and allow-listing#2092bs-shobhitkumar wants to merge 29 commits intomasterfrom
bs-shobhitkumar wants to merge 29 commits intomasterfrom
Conversation
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 2, 2026
ninadbstack
reviewed
Feb 4, 2026
packages/core/src/network.js
Outdated
| } | ||
|
|
||
| // Executes domain validation via external service | ||
| async function executeDomainValidation(network, hostname, url, domainValidation, client, workerUrl) { |
Contributor
There was a problem hiding this comment.
ideally move this to a different file - this file is getting too long with standalone functions
ninadbstack
approved these changes
Feb 4, 2026
ninadbstack
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new auto domain allow-listing feature to the Percy client and core, enabling automatic validation and management of external domains accessed during snapshot capture. This helps streamline asset handling by validating domains against project configuration and an external service, and by persisting new discoveries for future builds. The implementation includes changes to both the core logic and the client API, as well as comprehensive tests for the new functionality.
The most important changes are:
Core logic for auto domain allow-listing:
Percyclass, including sets for pre-approved, pre-blocked, session-allowed, and session-blocked domains, as well as statistics tracking. (packages/core/src/percy.js)packages/core/src/network.js) [1] [2]packages/core/src/network.js) [1] [2]Project domain configuration persistence:
Percyclass to load project domain config at startup and save newly discovered allowed/blocked domains at shutdown, integrating with the Percy client API. (packages/core/src/percy.js) [1] [2] [3]Percy client API enhancements:
patchmethod and new methodsupdateProjectDomainConfigandvalidateDomainto thePercyClientclass to support updating project domain configuration and validating domains via an external service. (packages/client/src/client.js) [1] [2]Test coverage for new features:
updateProjectDomainConfigandvalidateDomainmethods, including positive and negative scenarios and request payload validation. (packages/client/test/client.test.js,packages/client/test/helpers.js) [1] [2]Wiring and context propagation:
packages/core/src/discovery.js,packages/core/src/network.js) [1] [2]