FileRise is proxy-aware and can run under a subpath like /files. Use these rules for reliable URLs and auth.
Required settings
- Set
FR_PUBLISHED_URLto the public URL (e.g.https://example.com/files). - If your proxy strips the prefix, set
X-Forwarded-PrefixorFR_BASE_PATH. - If you are behind a proxy, set
FR_TRUSTED_PROXIESandFR_IP_HEADER. - Set
SECURE=truewhen behind HTTPS.
Nginx reverse proxy (subpath)
Example: proxy to Docker on 127.0.0.1:8080, mounted at /files.
location /files/ {
rewrite ^/files/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Prefix /files;
}Recommended env:
FR_PUBLISHED_URL=https://example.com/filesTraefik (Kubernetes)
Use StripPrefix and rely on X-Forwarded-Prefix:
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: filerise-strip-files
spec:
stripPrefix:
prefixes:
- /filesCommon pitfalls
- Trailing slash in
proxy_passcan break paths. - Forgetting
FR_PUBLISHED_URLresults in bad share links. - If the prefix is stripped but
FR_BASE_PATHis not set, links may be wrong.