Custom route if "ASK" Fails?

I think this is a simple question, likely with a Yes/No answer.

I have reverse proxy server with on_demand SSL enabled that first does an ‘Ask’ if certificate should be generated.

Is there a way to customize what happens if ‘Ask’ fails? For example route to another page, or show custom message?

No, because the ask endpoint is queried before a TLS connection is made – since there is no connection, there are no HTTP requests, so there are no HTTP responses, and thus no HTTP pages or messages.

(If Caddy hits the ask endpoint at all, it means it doesn’t have a certificate suitable for making a connection in the first place. No other loaded certificate will do as a substitute. If so, the ask endpoint wouldn’t be needed.)

Thanks. That makes sense. I figured this was likely the answer.

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