@pug-sh/crawlers 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/crawlers.js +3 -1
  2. package/package.json +1 -1
package/dist/crawlers.js CHANGED
@@ -162,7 +162,9 @@ async function send(endpoint, apiKey, report, ip, status) {
162
162
  method: 'POST',
163
163
  headers: { 'content-type': 'application/json', 'x-api-key': apiKey },
164
164
  body,
165
- redirect: 'error',
165
+ // Never follow a redirect, which would hand the key to another host. Workers throw on
166
+ // 'error', so a 3xx comes back as a refusal instead.
167
+ redirect: 'manual',
166
168
  signal: AbortSignal.timeout(timeoutMs),
167
169
  });
168
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pug-sh/crawlers",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Report the AI crawlers, search engines and SEO tools that read your site to Pug, from your own request handling.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",