@hallofame/cloudflare-agent 0.1.2 → 0.1.4
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.
- package/package.json +1 -1
- package/src/index.ts +2 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -35,7 +35,8 @@ export default {
|
|
|
35
35
|
|
|
36
36
|
const expectedPath = `/agents/hall-of-fame-agent/${encodeURIComponent(env.HOF_AGENT_ID)}`
|
|
37
37
|
if (url.pathname !== expectedPath) return new Response('Not found', { status: 404 })
|
|
38
|
-
if (!(await authorized(request, env.HOF_WORKER_CONTROL_TOKEN)))
|
|
38
|
+
if (!(await authorized(request, env.HOF_WORKER_CONTROL_TOKEN)))
|
|
39
|
+
return new Response('Unauthorized', { status: 401 })
|
|
39
40
|
|
|
40
41
|
return (await routeAgentRequest(request, env)) ?? new Response('Not found', { status: 404 })
|
|
41
42
|
},
|