codimd
codimd copied to clipboard
Sub-path deployment issue.
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.
Hi @siaimes,
Thanks for reaching us.
Did you set CMD_URL_PATH for your subpath in env vars or urlPath in config.json?
@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