Skip to content

Commit dce9eb3

Browse files
committed
docs/protect-an-instance: add info about allowedServices in api keys
1 parent 3243564 commit dce9eb3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/protect-an-instance.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ type KeyFileContents = Record<
159159
name?: string,
160160
limit?: number | "unlimited",
161161
ips?: (CIDRString | IPString)[],
162-
userAgents?: string[]
162+
userAgents?: string[],
163+
allowedServices?: "all" | string[],
163164
}
164165
>;
165166
```
@@ -179,6 +180,11 @@ where *`UUIDv4String`* is a stringified version of a UUIDv4 identifier.
179180
- when specified, requests with a `user-agent` that does not appear in this array will be rejected.
180181
- when omitted, any user agent can be specified to make requests with that API key.
181182

183+
- **`allowedServices`** is an array of allowed services or `"all"`.
184+
- when `"all"` is specified, the key will be able to access all supported services, even if they're globally disabled via `DISABLED_SERVICES`.
185+
- when an array of services is specified, the key will be able to access only the services included in the array.
186+
- when omitted, the key will use the global list of supported services.
187+
182188
- if both `ips` and `userAgents` are set, the tokens will be limited by both parameters.
183189
- if cobalt detects any problem with your key file, it will be ignored and a warning will be printed to the console.
184190

0 commit comments

Comments
 (0)