opnsense / plugins

OPNsense plugin collection

Home Page:https://opnsense.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caddy rewrite directive

Damix48 opened this issue · comments

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.
Currently, the Caddy plugin only enables the reverse_proxy directive through the web UI. Is it possible to modify the autosave.json file to add a rewrite directive for a subdomain?

Describe the solution you'd like
Add other configuration like rewrite

Describe alternatives you've considered
Using caddy without the plugin(?)

Additional context
I would like to replicate this configuration:

subdomain.{$DOMAIN} {
  rewrite /path /test/path
  @rewrite {
    path_regexp user ^/users/(.+)/path
    not path_regexp ^/users/(.+)/path/
  }
  rewrite @rewrite /test/users/{re.user.1}/path
  reverse_proxy {$IP}:8096
}

Thank you