From 841f877ee8d40a6388f4cbee4f2e540a69816dbb Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 31 Mar 2024 00:51:10 -0500 Subject: [PATCH] docs: Include info about UID in docs --- README.md | 7 +++++-- compose.yaml | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aa74f67..f4df505 100644 --- a/README.md +++ b/README.md @@ -116,8 +116,11 @@ docker run -p 4567:4567 \ -d chhoto-url:latest ``` -You can also set the redirect method to Permanent 308 (default) or Temporary 307 by setting -the `redirect_method` variable to `TEMPORARY` or `PERMANENT` (it's matched exactly). +You can set the redirect method to Permanent 308 (default) or Temporary 307 by setting +the `redirect_method` variable to `TEMPORARY` or `PERMANENT` (it's matched exactly). By +default, the auto-generated links are adjective-name pairs. You can use UIDs by setting +the `slug_style` variable to `UID`. You can also set the length of those slug by setting +the `slug_length` variable. It defaults to 8, and a minimum of 4 is supported. ## Disable authentication If you do not define a password environment variable when starting the docker image, authentication diff --git a/compose.yaml b/compose.yaml index 06b453b..f7ac93e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -21,6 +21,13 @@ services: # Pass the redirect method, if needed TEMPORARY and PERMANENT # are accepted values, defaults to PERMANENT # - redirect_method=TEMPORARY + + # By default, the auto-generated pairs are adjective-name pairs + # If you want UIDs, please change slug_style to UID + # Supported values for slug_style are "pair" and "UID" + # The length is 8 by default, and a minimum of 4 is allowed + # - slug_style=pair + # - slug_length=8 volumes: - db:/urls.sqlite networks: