I'm trying to proxy all requests to /static/pdfs to a cdn that has the same filenames but doesn't have the /static/pdfs prefix. I can do this easily with nginx like this:
location ^~ /static/pdfs/ {
rewrite /static/pdfs/(.*) http://mycdn.com/$1;
}
Is it possible to do the same thing with haproxy?
Best Answer
You will have to use a frontend /backend configuration. For example:
I'm doing this from memory so it might not be exactly right, but if not then it's pretty close.