Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Starting with 1.3.0, you can customize the User-Agent header for every HTTP request that Fedify makes.

https://unstable.fedify.dev/manual/federation#useragent

userAgent

This API is available since Fedify 1.3.0.

The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.:

Fedify/1.3.0 (Deno/2.0.4)
Fedify/1.3.0 (Node.js/v22.10.0)
Fedify/1.3.0 (Bun/1.1.33)

You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options:

{
  software: "MyApp/1.0.0",
  url: "https://myinstance.com/"
}

The User-Agent header will be like:

MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/)

Or, you can rather provide a custom User-Agent string directly instead of an object for options.
userAgent This API is available since Fedify 1.3.0. The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.: Fedify/1.3.0 (Deno/2.0.4) Fedify/1.3.0 (Node.js/v22.10.0) Fedify/1.3.0 (Bun/1.1.33) You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options: { software: "MyApp/1.0.0", url: "https://myinstance.com/" } The User-Agent header will be like: MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/) Or, you can rather provide a custom User-Agent string directly instead of an object for options.