Internal requests

Is it possible for a plugin to make a mock request of Caddy without looping through the network?

I’m trying to write a dynamic www redirecting plugin that’ll only issue redirects if the target exists, so I want my plugin to ask caddy “hey, what would happen if you got this request?”.

I think you’re looking for something similar to what we’re doing here in templates handler:

1 Like

ooo yes, that looks right. thank you!

This topic was automatically closed after 30 days. New replies are no longer allowed.