codimd icon indicating copy to clipboard operation
codimd copied to clipboard

Sub-path deployment issue.

Open siaimes opened this issue 4 years ago • 2 comments

When the user is not logged in, click on the link shared by others. The user will be asked to log in. But when the user logs in successfully, the browser redirects the user to the original page but loses the subpath, resulting in a 404 error.

siaimes avatar Jun 22 '21 07:06 siaimes

Hi @siaimes, Thanks for reaching us. Did you set CMD_URL_PATH for your subpath in env vars or urlPath in config.json?

jackycute avatar Jun 22 '21 08:06 jackycute

@jackycute This is my configuration file.

version: "3"
services:
  database:
    container_name: codimd_database
    image: postgres:11.6-alpine
    environment:
      - POSTGRES_USER=***
      - POSTGRES_PASSWORD=***
      - POSTGRES_DB=codimd
    volumes:
      - "./postgresql:/var/lib/postgresql/data"
    restart: always
  codimd:
    container_name: codimd_main
    image: hackmdio/hackmd:2.4.1
    environment:
      - CMD_DB_URL=postgres://***:***@database/codimd
      - CMD_USECDN=false
      - CMD_DOMAIN=***
      - CMD_PROTOCOL_USESSL=true
      - CMD_URL_PATH=codimd
      - CMD_IMAGE_UPLOAD_TYPE=filesystem
    depends_on:
      - database
    volumes:
      - ./upload-data:/home/hackmd/app/public/uploads
    restart: always

siaimes avatar Jun 22 '21 09:06 siaimes