Skip to content

Commit 517d159

Browse files
committed
log unauthorized requests too
1 parent 100f159 commit 517d159

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default {
6262
if (pathname.startsWith(env.EDIT_PREFIX)) {
6363
const authError = doAuth(env, request);
6464
if (authError) {
65+
await logger.log(request);
6566
return authError;
6667
}
6768
const filepath = pathname.slice(env.EDIT_PREFIX.length);
@@ -100,6 +101,7 @@ export default {
100101
if (pathname.startsWith(env.LOGS_PREFIX)) {
101102
const authError = doAuth(env, request);
102103
if (authError) {
104+
await logger.log(request);
103105
return authError;
104106
}
105107
const id = pathname.slice(env.LOGS_PREFIX.length).slice(1);

0 commit comments

Comments
 (0)