-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The --shr-site option (added in v1.20.2 via #1211) correctly overrides the URL when creating a new share, and also applies to the QR code link in the shares listing page. However, the actual share links displayed in the /?shares page still use the request origin instead of the configured shr-site value.
To Reproduce
- Configure copyparty behind a reverse proxy with internal/external domain split
- Set
shr-site: https://publicurl.com/in config - Access copyparty via internal URL (
http://privateurl.com) - Go to
/?sharesto view existing shares - Observe that share links show
http://privateurl.com/shr/xxxinstead ofhttp://publicurl.com/shr/xxx
Expected behavior
Share links in the /?shares page should use the shr-site URL, matching the behavior of newly created shares and QR code links.
Server details (if you're NOT using docker/podman)
- server OS / version: macOS (Mac Studio)
- what copyparty did you grab: sfx
- how you're running it: as a LaunchAgent via Automator app wrapper (for Full Disk Access)
- copyparty version: 1.20.3
- copyparty config:
[global]
p: 3923
e2dsa
e2ts
z
shr: /s
rproxy: 1
rp-loc: /studio
name: publicurl.com
xff-src: 192.168.2.0/24
xff-hdr: x-forwarded-for
shr-site: https://publicurl.com/The rest of the stack
- Synology Reverse Proxy on port 80 handles Tailnet access (
privateurl.com→internal-ip:3923) - Caddy on NAS port 3924 handles Cloudflare tunnel routing for public access (
publicurl.com) - Internal access is via Tailscale VPN
Additional context
Looking at the code in copyparty/web/shares.html line 44, the QR link uses {{ site }} but the share link uses {{ r }}:
<a href="{{ site }}{{ shr }}{{ k }}?qr">qr</a> <!-- uses site ✓ -->
<a href="{{ r }}{{ shr }}{{ k }}">{{ k }}</a> <!-- uses r (request root) ✗ -->The second link should also use {{ site }} for consistency.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working