timvisee / send

:mailbox_with_mail: Simple, private file sharing. Mirror of https://gitlab.com/timvisee/send
https://send.vis.ee
Mozilla Public License 2.0
4.8k stars 278 forks source link

Download and Copy Link links have double-backslash using using BASE_URL #163

Open michaelkrieger opened 1 year ago

michaelkrieger commented 1 year ago

On the https://send.mydomain.com/ page, the "Download" and "Copy Link" links have a double-backslash, which prevents them from working. i.e.: https://send.mydomain.com:9876//download/11f2...2810/#YbL...ZNwg . Clicking either link states that "This link has expired." Simply removing a backslash brings me to "Download files. This file was shared...".

Naturally the double-backslash shouldn't be there. I don't see any configuration concerns that would add it. Tried BASE_URL both with and without a trailing backslash.

docker-compose configuration...

  send:
    image: registry.gitlab.com/timvisee/send:latest
    restart: always
    volumes:
      - /serverfilepath:/uploads
    environment:
      - VIRTUAL_HOST=send.mydomain.com
      - VIRTUAL_PORT=9876
      - DHPARAM_GENERATION=false
      - NODE_ENV=production
      - BASE_URL=https://send.mydomain.com:9876
      - MAX_FILE_SIZE=10737418240
      - MAX_EXPIRE_SECONDS=2592000
      - REDIS_HOST=redis
      - FILE_DIR=/serverfilepath
    labels:
      - "traefik.enable=true"
      - 'traefik.http.routers.send.entrypoints=secure'
      - 'traefik.http.routers.send.rule=Host(`send.mydomain.com`)'
      - 'traefik.http.routers.send.tls=true'
Kidoly commented 1 year ago

it's not that but you forgot to put a dot before your volumes:

`volumes:

Here my old conf:

version: '3'

services:
  send:
    image: 'registry.gitlab.com/timvisee/send:latest'
    restart: always
    ports:
      - 8080:8080
    environment:
      - VIRTUAL_HOST=send.mydomain.com
      - VIRTUAL_PORT=80
      - DHPARAM_GENERATION=false
      - NODE_ENV=production
      - BASE_URL=https://send.mydomain.com
      - PORT=8080
      - REDIS_HOST=send-redis
      - MAX_FILE_SIZE=10747904000
    volumes:
      - ./data/send/uploads:/uploads

  send-redis:
    image: 'redis:alpine'
    restart: always
    volumes:
      - ./data/send/redis:/data