fix(SetupChecks): allow compatible X-Robots-Tag directives - #64573
Open
joshtrichards wants to merge 2 commits into
Open
joshtrichards wants to merge 2 commits into
joshtrichards wants to merge 2 commits into
Conversation
joshtrichards
added this pull request to stack #64574
September 19, 2026 18:51
joshtrichards
requested review from
icewind1991,
leftybournes and
salmart-dev
September 19, 2026 18:51
7 tasks
Base automatically changed from
jtr/fix-setupChecks-value-ordering
to
master
September 19, 2026 20:44
Preserve the required `noindex,nofollow` directives while allowing compatible additions such as `noarchive`, `nosnippet`, `noimageindex`, and `notranslate`. Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna Signed-off-by: Josh <josh.t.richards@gmail.com>
come-nc
force-pushed
the
jtr/fix-setupChecks-value-ordering-compatible
branch
from
September 19, 2026 20:44
d75be76 to
679b2bf
Compare
come-nc
reviewed
Sep 19, 2026
come-nc
left a comment
Contributor
There was a problem hiding this comment.
I do not know enough of the sysadmin part to approve this one.
I’m also not sure why parseDirective is a callable and not inlined since it’s only used once?
Comment on lines
+64
to
+67
| $directives = array_map( | ||
| static fn (string $directive): string => strtolower(trim($directive)), | ||
| explode(',', $value) | ||
| ); |
Contributor
There was a problem hiding this comment.
Should use the same trick as above, why did you implement it different? You can strlower the whole thing.
Suggested change
| $directives = array_map( | |
| static fn (string $directive): string => strtolower(trim($directive)), | |
| explode(',', $value) | |
| ); | |
| $directives = array_map('trim', explode(',', strtolower($value))); |
MichaIng
approved these changes
Sep 19, 2026
MichaIng
left a comment
Member
There was a problem hiding this comment.
From sysadmin side it makes sense: If noindex, and nofollow are there, everything else is redundant, but does not hurt.
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.
X-Robot-Tagexpects exact match, resulting in a warning #37409Summary
Builds on #64571 -
Preserve the required
noindex,nofollowdirectives while allowing compatible additions such asnoarchive,nosnippet,noimageindex, andnotranslate. Still disallow incompatible combinations.Includes updated tests.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)