How to dispatch a request? use proxy or static

I want:
non-static resource use proxy (eg. nodejs server)
static resource not via proxy, like via rewrite access root (eg. /to/path/www/public)

How do I write CaddyFile?
Give me a example, please.

Hi @fanybook,

Try rewriting to your static file and falling back to a proxy. {
  rewrite {
    to {path} {path}/ /proxy{uri}
  proxy /proxy http://upstream {
    without /proxy

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