[Connection-Allowlist] Match simple patterns rather than origins. #55911
+91
−13
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 CL shifts the ductwork between //content and //services/network
to pass allowlist patterns as strings that are converted into
SimpleUrlPatternMatcherobjects when injected into a given networkcontext for enforcement via
NetworkContext::RevokeNetworkForNonces.This allows us to support substantially more robust matching syntax, and
gets fairly close to the breadth of what URL Pattern promises.
In the future, we'll have to consider the fact that this implementation
via
SimpleUrlPatternMatcherdoes not support regex. That might be aproblem as we move past the prototype phase, but it might also be a
reasonable tradeoff to make (and one in-line with shared dictionaries
and service worker routing). A question for later...
Bug: 447954811
Change-Id: Ibcc076ffb4c50a8d9b3c1a11fa08374abe83e844
Reviewed-on: https://chromium-review.googlesource.com/7122019
WPT-Export-Revision: 249a8c179ce1694c302bcd4f3d31f6964461a879