Missing Starlark documentation

Hello, some pages mention that Caddy now supports Starlark which sounds very interesting.
Is there any documentation available?

Starlark support was planned during the v2 betas, but not implemented yet because of changing priorities and it being deemed not yet necessary. Something like that may come later though.

Where did you read about it?

Here: starlark/users.md at master · bazelbuild/starlark · GitHub (Starlark implementations, tools, and users)

This would be killer feature. Scriping a custom middleware is one reason why I am currently evaluating other api gateways.

1 Like

You can write your own middleware as a Caddy plugin written in Go:

Ah, yeah, we were planning on using it and started integrating it but decided to shelve it until we could devote more development resources to it. It’ll probably require a coordinated, focused effort from multiple devs to make it happen. But if anyone wants to work on it I can at least join the discussions, and I agree with you: it would be a killer feature.

(For now, we went with CEL integration for request matching. Very lightweight, powerful, etc.)

I’d love to see Starlark modules for Caddy.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.