Search code examples
javaclojurecompojureringclj-http

Passing all requests to /api/v1/** to the old api server


For the 2nd iteration of our API we are performing a complete re-write.

To make the transition smooth I would like to setup our new server with an API endpoint /api/v1/** such that it will become a mirror of the old server.

Is there any built in functionality in ring/compojure that will allow me to pass the entire request to clj-http (or other http client)?


FIY: Both servers are written in Clojure using the Compojure and ring libraries.


Solution

  • Take a look on ring-proxy, I used it exactly for the same purpose.