Restrict Virtual Server to specific HTTP Method

Hi,

Is it possible to restrict a virtual host to a certain HTTP Method?
My use case is that I have legacy server with client that do not support TLS. They need to submit data through HTTP POST to a certain URL which also reacts to GET requests.
I would need something like this

mydomain.com:8080/modelName POST {
  proxy / backend:3000
}

Is this possible with the current version of caddy?

No, not currently. It’s the first I’ve ever heard of a need for it.

Shouldn’t the backend differentiate the verbs and act accordingly?

1 Like

You are right, usually this should be handled by the backend. In my case, I have two virtual hosts. One with automatic tls and one (for the legacy devices) without tls.

I guess I have to change the backend.

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