From ed2be0e883b20cc5619463f5a8972e006cb643b9 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 28 May 2024 18:20:09 -0500 Subject: [PATCH] docs: Some documentation about public-mode --- README.md | 5 +++++ compose.yaml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index a75aec6..b5fbf4c 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ for small. URL means, well... URL. So the name simply means Small URL. - Counts number of hits for each short link in a privacy respecting way i.e. only the hit is recorded, and nothing else. - Has a mobile friendly UI. +- Has a public mode, where anyone can add links without authentication. Deleting + or listing available links will need admin access using the password. - Allows setting the URL of your website, in case you want to conveniently generate short links locally. - Links are stored in an SQLite database. @@ -128,6 +130,9 @@ default, the auto-generated links are adjective-name pairs. You can use UIDs by 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. +To enable public mode, set `public_mode` to `Enable`. With this, anyone will be able to add +links. Listing existing links or deleting links will need admin access using the password. + ## Instructions for CLI usage The application can be used from the terminal using something like `curl`. In all the examples below, replace `http://localhost:4567` with where your instance of `chhoto-url` is accessible. diff --git a/compose.yaml b/compose.yaml index e9ea700..12bdf21 100644 --- a/compose.yaml +++ b/compose.yaml @@ -31,6 +31,10 @@ services: # The length is 8 by default, and a minimum of 4 is allowed # - slug_style=Pair # - slug_length=8 + + # In case you want to provide public access to adding links (and not + # delete, or listing), change the following option to Enable + # - public_mode=Disable volumes: - db:/urls.sqlite networks: