Skip to content

Commit a2651ed

Browse files
author
Guy Bedford
authored
Correct Acl documentation for null lookup (#1131)
1 parent 141dcf1 commit a2651ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/docs/acl/Acl/prototype/lookup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ address prefix that was matched in the ACL.
3232
import { Acl } from 'fastly:acl';
3333
addEventListener('fetch', async (evt) => {
3434
const myAcl = Acl.open('myacl');
35-
const { action, prefix } = await myAcl.lookup(evt.client.address);
36-
evt.respondWith(new Response(action === 'BLOCK' ? 'blocked' : 'allowed'));
35+
const match = await myAcl.lookup(evt.client.address);
36+
evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));
3737
});
3838
```

0 commit comments

Comments
 (0)