Caddy v2 rewrite Webpack devServer React Router

Idk, something like this?

            {
              "group": "group0",
              "match": [
                {
                  "path_regexp": {
                    "name": "strip",
                    "pattern": "\\/myapp-ui-dev(.*)"
                  }
                }
              ],
              "handle": [
                {
                  "handler": "rewrite",
                  "uri": "/myapp-ui-dev/"
                }
              ]
            }

Your requirements aren’t perfectly clear to me… so that’s just a guess.

You can use {http.regexp.strip.1} to use the (.*) capture.

If you don’t actually care what the suffix bit is, you could just always rewrite to /myapp-ui-dev/ and not even use a path_regexp matcher.