We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 141dcf1 commit a2651edCopy full SHA for a2651ed
documentation/docs/acl/Acl/prototype/lookup.mdx
@@ -32,7 +32,7 @@ address prefix that was matched in the ACL.
32
import { Acl } from 'fastly:acl';
33
addEventListener('fetch', async (evt) => {
34
const myAcl = Acl.open('myacl');
35
- const { action, prefix } = await myAcl.lookup(evt.client.address);
36
- evt.respondWith(new Response(action === 'BLOCK' ? 'blocked' : 'allowed'));
+ const match = await myAcl.lookup(evt.client.address);
+ evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));
37
});
38
```
0 commit comments