Skip to content

Integration with Worker Sites #27

Description

@jorgelbg

Since a request can go through a single Cloudflare worker, it is not possible to run dashflare transparently. This is becoming more important after the release of Worker Sites that allow running a full website from the worker.

For this case, #7 introduced the possibility of forwarding the URL directly to the worker. This PR makes the worker stop behaving as a transparent proxy and just analyze the URL received via the x-original-url header.

Still pending:

  • Document how to set up dashflare with a Worker Site
  • Maybe publish a small npm module to do the forwarding
  • Allow the possibility of forwarding also a status code, now it is hardcoded to 200
  • Forwarding of the origin fetch time

See https://github.com/mre/endler.dev/blob/master/workers-site/index.js#L66-L73, is the only working example of this setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions