Asnim P Ansari
Asnim P Ansari

Reputation: 2487

Send 200 response in caddy reverse proxy before forwarding the request

Is it possible to send a 200 request to the server calling a reverse proxy, irrespective of whether the proxy server is available or not? The reason is when the calling server gets non-200 HTTP codes for some threshold value continuously, it will stop sending the requests for that day.

Current caddy config

abc.xyz.com {
    reverse_proxy {
    to localhost:23003
  }
}

Upvotes: 0

Views: 379

Answers (1)

vishun
vishun

Reputation: 97

can try this:

abc.xyz.com {
    reverse_proxy {
    to localhost:23003
    @name {
        status 500
    }
    replace_status @name 200
  }
}

the document: Intercepting responses

Upvotes: 0

Related Questions