Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 3.42.1 (2026-05-18)

### Fixed

* Null body for non-downstream requests with no stream created for them ([#1479](https://github.com/fastly/js-compute-runtime/issues/1479)) ([511c667](https://github.com/fastly/js-compute-runtime/commit/511c6672e18b8872f707a3942a5d53c651e03797))

## 3.42.0 (2026-05-11)

### Added
Expand Down
6 changes: 3 additions & 3 deletions documentation/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 34 additions & 34 deletions documentation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions documentation/versioned_docs/version-3.42.1/acl/Acl/open.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# Acl.open()

Opens the ACL with the given name, returning a new `Acl` instance with the given name on success.

## Syntax

```js
Acl.open(name)
```

### Return value

An `Acl` instance.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# Acl.prototype.lookup()

The **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.

## Syntax

```js
acl.lookup(ipAddress)
```

### Parameters

- `ipAddress` _: string_
- IPv4 or IPv6 address to lookup

### Return value

An Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP
address prefix that was matched in the ACL.

## Example

```js
/// <reference types="@fastly/js-compute" />
import { Acl } from 'fastly:acl';
addEventListener('fetch', async (evt) => {
const myAcl = Acl.open('myacl');
const match = await myAcl.lookup(evt.client.address);
evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));
});
```
Loading
Loading