This repository was archived by the owner on Mar 19, 2026. It is now read-only.
Commit d1adffa
authored
Fix bug causing the middleware to never work (#25)
Before this change, the middleware would consider a request as "requesting pre-rendered page" only when the user agent was exactly the same as one of the "crawler user agents" specified in the config file. This is a bug because, typically, the User Agent of a crawler is not just one word.
Example of one of the Googlebot's User Agents:
Googlebot/2.1 (+http://www.google.com/bot.html)1 parent a324b25 commit d1adffa
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
0 commit comments