I'm configuring a proxy (http-proxy-middleware) for dev server, using the following configuration
app.use(
  /^\/(pathone|pathtwo|pathonetwo)/,
  createProxyMiddleware(...)
)
This matches /pathone and /pathtwo correctly, but /pathonetwo is completely ignored and loads the index page instead. How to avoid this? I can't add a $ at the end because I also need to match paths like /load/1.
Edit: using an array of paths (['/pathone', '/pathtwo', '/pathonetwo']) works as expected. Is there a bug in how it treats regexps?