INNER CODE UNIT · TypeScript
Egress
pollinations/pollinations · apps/computer-mcp/src/index.ts:81
export class Egress extends WorkerEntrypoint {
override fetch(request: Request): Promise<Response> {
const outbound = new Request(request);
if (!outbound.headers.has("user-agent")) {
outbound.headers.set(
"user-agent",
"pollinations-computer (+https://pollinations.ai)",
);
}
return fetch(outbound);
}
}
type GitIdentity = { name: string; email: string };
export class Computer extends withWorkspace(
class extends DurableObject<Env> {
// Git reads this object on every commit, so fetch can fill in the