Skip to content

Add environment to Cloudflare adapter #2844

Closed
@piperswe

Description

@piperswe

Describe the problem

Cloudflare Workers provide an environment object containing environment variables and bindings to other Cloudflare services, such as Workers KV and Durable Objects. Currently, the Cloudflare adapter doesn't seem pass this object to endpoints, so those endpoints can't access those services.

Describe the proposed solution

The Cloudflare adapter should pass the environment object through to the endpoint somehow, potentially through the request's locals. In addition, it would be great to have a way to export Durable Object classes.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions