~cadence/oven-setup

2c66caea5d5e78eb77c65523f3e9f55e016dec1e — Cadence Ember 11 months ago 984d475 main
Caddyfile
1 files changed, 21 insertions(+), 0 deletions(-)

A Caddyfile
A Caddyfile => Caddyfile +21 -0
@@ 0,0 1,21 @@
### Configuration for OvenPlayer
oven.cadence.moe

# Reverse proxy anything in /app/ to the OvenMediaEngine container's exposed port
reverse_proxy /app/* localhost:3333

# Redirect /s/foo shortcut URLs to an OvenPlayer-compatible URL to watch the stream with that key.
route { # force rewrite before redir
      rewrite / /s/stream
      @stream path_regexp stream ^/s/(.*)$
      redir @stream /docs/demo.html#sources=[\{"file":"wss://oven.cadence.moe/app/{re.stream.1}"\}]
}

# Everything else is the HTML/CSS/JS for OvenPlayer.
file_server
root * /var/www/OvenPlayer

### End configuration for OvenPlayer


import Caddyfile.d/*.caddyfile # add additional sites here if you like.