这是indexloc提供的服务,不要输入任何密码
Skip to content

Prevents redirects in the find_robots_txt check #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

erikb-stripe
Copy link
Contributor

Fixes #246 by explicitly disabling redirects on the find_robots_txt check. Adds asserts that this is the case in the tests.

This allows for the case where a service domain redirects to another domain that does not have the X-Robots-Tag.

This shouldn't change the behavior of non-redirecting which must either 4xx or 5xx when the home page is hit.

Must have a homepage that redirects to a different domain or results in 4xx (client error) or 5xx (server error).

Copy link
Contributor

@sjledoux sjledoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this bug! I agree with the change, but would prefer a different way of handling the testing in rws_tests.py

Verified that changing RwsCheck to allow redirects fails test
Copy link

github-actions bot commented Feb 5, 2024

Looks like you've passed all of the checks!

@erikb-stripe erikb-stripe requested a review from sjledoux February 5, 2024 20:26
Copy link
Contributor

@sjledoux sjledoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging.

@sjledoux sjledoux merged commit 00b7a05 into GoogleChrome:main Feb 6, 2024
cfredric pushed a commit to cfredric/chrome-first-party-sets that referenced this pull request Mar 11, 2024
* Do not allow redirects on robots.txt check.

* Assert no redirects in tests

* Update tests based on review feedback

Verified that changing RwsCheck to allow redirects fails test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find_robots_txt check does not work with redirects or reflect the test description
2 participants