Make proxy for google recaptcha


(Andrey Izotov) #1

I want to make google recaptcha accessible for users from china

google and gstatic are blocked, i want to setup proxy for my domain.
My server is located in singapore so i want requests to google go through my server.

There is solution for apache here. https://gist.github.com/zypA13510/fc3669a4c6957f3593c6ebed76d1d433
Need to adopt it for caddy.


(Matthew Fay) #2

You can imitate the filters with http.filter, but Caddy has no method to substitute the cookie domain or replicate ProxyPassReverse.

Once PR #2144 is merged (Regex rewriting of upstream/downstream headers in proxy), it should be configurable to do both, I expect. In the meantime, the simplest solution if you need Caddy’s features at the edge would be to reverse proxy to an Apache reverse proxy.


(Andrey Izotov) #3

I think i would wait for pure caddy solution