Describe the bug
When FileRise is served under a subpath (/filerise) behind Traefik with StripPrefix, WebDAV MOVE requests fail with 403 Forbidden, because the Destination header contains the public prefix while sabre/dav only knows the base URI /webdav.php/.
Other WebDAV requests (e.g. PROPFIND, GET, PUT) work through the same URL. The Admin panel shows the subpath correctly under "Firewall and Proxy Settings" (Effective base path: /filerise).
Setup
- FileRise: 3.30.0, Docker image
error311/filerise-docker:latest
- Reverse proxy: Traefik 3.7, router rule
Host(...) && PathPrefix(/filerise), StripPrefix middleware for /filerise (Traefik then sends X-Forwarded-Prefix: /filerise)
- Env:
FR_PUBLISHED_URL=https://example.com/filerise, SECURE=true; tried additionally FR_BASE_PATH=/filerise (no change)
- Public WebDAV URL as described in the docs:
https://example.com/filerise/webdav.php/
Steps to reproduce
curl -v -X MOVE -u "user:pass" \
-H "Destination: https://example.com/filerise/webdav.php/target/file.txt" \
-H "Overwrite: F" \
"https://example.com/filerise/webdav.php/source/file.txt"
Actual behavior
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:sabredav-version>4.7.0</s:sabredav-version>
<s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
<s:message>Requested uri (/filerise/webdav.php/webdav/Archiv/2026/09/21/file.csv) is out of base uri (/webdav.php/)</s:message>
</d:error>
Expected behavior
MOVE works like without a subpath, since the docs describe WebDAV under a subpath (https://your-server/files/webdav.php/) and recommend stripping the prefix and sending X-Forwarded-Prefix for container setups.
Workaround
Removing /filerise from the Destination header makes MOVE work. To do this for all clients, I added an Apache snippet in the container (mod_headers):
<IfModule mod_headers.c>
RequestHeader edit Destination "^(https?://[^/]+)/filerise(/.*)$" "$1$2"
RequestHeader edit Destination "^/filerise(/.*)$" "$1"
</IfModule>
Question
Is WebDAV MOVE/COPY under a subpath with a stripped prefix supposed to work? If so, could the WebDAV base URI take FR_BASE_PATH / X-Forwarded-Prefix into account (or rewrite the Destination header accordingly)?
Related
Describe the bug
When FileRise is served under a subpath (
/filerise) behind Traefik withStripPrefix, WebDAVMOVErequests fail with403 Forbidden, because theDestinationheader contains the public prefix while sabre/dav only knows the base URI/webdav.php/.Other WebDAV requests (e.g. PROPFIND, GET, PUT) work through the same URL. The Admin panel shows the subpath correctly under "Firewall and Proxy Settings" (Effective base path:
/filerise).Setup
error311/filerise-docker:latestHost(...) && PathPrefix(/filerise),StripPrefixmiddleware for/filerise(Traefik then sendsX-Forwarded-Prefix: /filerise)FR_PUBLISHED_URL=https://example.com/filerise,SECURE=true; tried additionallyFR_BASE_PATH=/filerise(no change)https://example.com/filerise/webdav.php/Steps to reproduce
Actual behavior
Expected behavior
MOVE works like without a subpath, since the docs describe WebDAV under a subpath (
https://your-server/files/webdav.php/) and recommend stripping the prefix and sendingX-Forwarded-Prefixfor container setups.Workaround
Removing
/filerisefrom theDestinationheader makes MOVE work. To do this for all clients, I added an Apache snippet in the container (mod_headers):Question
Is WebDAV
MOVE/COPYunder a subpath with a stripped prefix supposed to work? If so, could the WebDAV base URI takeFR_BASE_PATH/X-Forwarded-Prefixinto account (or rewrite theDestinationheader accordingly)?Related