Commit 248d756
authored
test(middleware,robots): guard the vary header and crawl allowlist (#105)
The middleware suite only asserted that the homepage does not vary, so
removing withMarkdownVary kept every test green while shipping a
cache-poisoning regression. Add a positive assertion that negotiated
docs URLs carry Vary: Accept, User-Agent on both the markdown rewrite
and the HTML pass-through.
The robots suite checked for Allow: / but never for blocking rules, so
a blanket Disallow: / would pass. Assert that no user-agent group
contains any Disallow directive, matching the current robots.txt.1 parent b25f575 commit 248d756
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
86 | 102 | | |
87 | 103 | | |
88 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
98 | 108 | | |
0 commit comments