-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inquiry on Using Starlark Scripting with Caddy #6325
Comments
This was discussed at one time, about 5 years ago, but as far as I know never came to fruition. Where did you find the capability? |
@mholt On the Starlark official repo: https://github.com/bazelbuild/starlark/blob/master/users.md |
It said that ---
|
Ah, no that's not true. We gave up on it because writing Caddy plugins in Go is so easy and doesn't require any additional work from us to provide (since Caddy was designed to be modular from the ground up). https://caddyserver.com/docs/extending-caddy We are using https://github.com/google/cel-go though which is an embedded language, which allows for matching requests using a complex boolean expression. See https://caddyserver.com/docs/caddyfile/matchers#expression |
I recently came across the capability of using Starlark scripting with Caddy and am quite intrigued by the prospects it opens up for customizing and extending functionality. However, I've had a difficult time finding comprehensive documentation or examples on how to properly utilize Starlark scripts within the Caddy ecosystem.
Could you please provide guidance or point me to resources on the following:
Getting Started with Starlark in Caddy: Any initial steps or prerequisites required to start using Starlark scripts with Caddy.
Example Scripts: If possible, a few example Starlark scripts that demonstrate basic to intermediate usage within Caddy. This could include examples of modifying requests/responses, routing logic, or any other common use cases.
Best Practices: Any best practices or recommendations when scripting with Starlark in the context of Caddy. This might include performance considerations, security practices, or common patterns.
Troubleshooting and Debugging: Tips on how to troubleshoot and debug Starlark scripts when things don't go as expected.
I am quite excited about the potential to leverage Starlark to tailor my Caddy setup more closely to my needs but want to ensure I'm using it effectively and appropriately.
Thank you for any information or insights you can provide!
The text was updated successfully, but these errors were encountered: