Not able to get this working behind Caddy V2 as a subdirectory. I am running the latest versions of both Caddy and Syncthing in Docker containers.
Having the same issues as this user it appears.
I tried removing JWT to rule it out, but I get the same error. I have many other apps working, but they all support a base URL/prefix. Not sure if that is what is causing me issues or if I am missing something else.
Caddyfile (relevant part)
route /syncthing/* {
jwt
reverse_proxy http://192.168.1.104:8384
}
Caddy Logs
{"level":"debug","ts":1624196432.527457,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.1.104:8384","request":{"remote_addr":"23.xxx.xxx.107:57978","proto":"HTTP/2.0","method":"GET","host":"auth.mydoamin.duckdns.org","uri":"/syncthing/","headers":{"X-Forwarded-Proto":["https"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36"],"Sec-Fetch-User":["?1"],"Referer":["https://auth.mydomain.org/portal"],"Accept-Language":["en-US,en;q=0.9"],"Sec-Fetch-Mode":["navigate"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"],"Sec-Fetch-Site":["same-origin"],"Accept-Encoding":["gzip, deflate, br"],"Cookie":["access_token=<redacted>; CSRF-Token-LK7LV=<rectaed>"],"X-Forwarded-For":["23.xxx.xxx.107"],"Sec-Ch-Ua":["\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"91\", \"Chromium\";v=\"91\""],"Sec-Ch-Ua-Mobile":["?0"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Dest":["document"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","proto_mutual":true,"server_name":"auth.mydomain.org"}},"headers":{"X-Xss-Protection":["1; mode=block"],"Content-Length":["19"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Syncthing-Id":["LK7LVQ6-GJT2XBS-URYGXWG-QSMEKSG-NOPRWA5-4ZL2VBE-DJMD32Y-2NGQPAV"],"X-Syncthing-Version":["v1.17.0"],"Date":["Sun, 20 Jun 2021 13:40:32 GMT"],"Content-Type":["text/plain; charset=utf-8"]},"status":404}
Any ideas?