There’s an except subdirective that looks promising - could be used to exempt the static resources?
I just checked this and the handler failed to pass the static file resources on. I will look into why this is not working as expected.
I did have success with the rewrite
directive:
Caddyfile
http://127.0.0.1:81 {
tls off
root /var/www/development
rewrite / /cgit
cgi {
match /cgit
exec /usr/local/cgi-bin/cgit
env CGIT_CONFIG=/home/quixote/caddy/cgitrc
}
}
cgitrc
css=/cgit-resource/cgit.css
favicon=/cgit-resource/favicon.ico
logo=/cgit-resource/cgit.png
Static files are located in /var/www/development/cgit-resource.