From cca5bcfa1ad220e54e555b9652beb27be60e28ef Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 6 Jan 2025 11:47:01 +0530 Subject: [PATCH] docs: Add example command to generate API key --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0bf6c80..3fc90ee 100644 --- a/README.md +++ b/README.md @@ -193,10 +193,13 @@ The server will send a confirmation. In order to use API key validation, set the `api_key` environment variable. If this is not set, the API will default to cookie validation (see section above). If the API key is insecure, a warning will be outputted along with a generated API key which may be used. +Example Linux command for generating a secure API key: `tr -dc A-Za-z0-9 " -d '{"shortlink":"", "longlink":""}' http://localhost:4567/api/new ``` +Send an empty `` if you want it to be auto-generated. The server will reply with the generated shortlink. To get a list of all the currently available links: ``` bash