Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Keep the login page out of search indexes
Diffstat (limited to 'tests/t0505-auth.sh')
| -rwxr-xr-x | tests/t0505-auth.sh | 14 |
1 file changed, 14 insertions, 0 deletions
diff --git a/tests/t0505-auth.sh b/tests/t0505-auth.sh index f7096ca..e9349d4 100755 --- a/tests/t0505-auth.sh +++ b/tests/t0505-auth.sh @@ -102,4 +102,18 @@ test_expect_success 'the login page keeps the repository to itself' ' ! grep "Mallory" tmp ' +# The login page answers in place of whatever page was asked for, so it is +# kept out of a search index, whatever the site allows for its own pages. +test_expect_success 'the login page asks not to be indexed' ' + cgit_rc denyrc "url=authy/log/" >tmp && + grep "^Status: 200" tmp && + grep "<meta name=.robots. content=.noindex, nofollow.>" tmp && + { + echo "robots=" && + cat denyrc + } >norobotsrc && + cgit_rc norobotsrc "url=authy/log/" >tmp && + grep "<meta name=.robots. content=.noindex, nofollow.>" tmp +' + test_done |
