mirror of
https://github.com/SinTan1729/chhoto-url
synced 2025-02-05 13:52:33 -06:00
Change README.md
This commit is contained in:
parent
aab7a9b3d1
commit
a1f8700664
1 changed files with 3 additions and 0 deletions
|
@ -187,6 +187,7 @@ The server will send a confirmation.
|
||||||
|
|
||||||
### API key validation
|
### API key validation
|
||||||
**This is required for programs that rely on a JSON response from Chhoto URL**
|
**This is required for programs that rely on a JSON response from Chhoto URL**
|
||||||
|
|
||||||
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).
|
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. Aditionally, in this situation, a generated API key will be outputted which may be used.
|
If the API key is insecure, a warning will be outputted. Aditionally, in this situation, a generated API key will be outputted which may be used.
|
||||||
|
|
||||||
|
@ -209,6 +210,8 @@ Where `<shortlink>` is name of the shortened link you would like to delete. For
|
||||||
The server will output when the instance is accessed over API, when an incorrect API key is received, etc.
|
The server will output when the instance is accessed over API, when an incorrect API key is received, etc.
|
||||||
|
|
||||||
|
|
||||||
|
In both modes, these routes are accessible:
|
||||||
|
|
||||||
You can get the version of `chhoto-url` the server is running using `curl http://localhost:4567/api/version` and
|
You can get the version of `chhoto-url` the server is running using `curl http://localhost:4567/api/version` and
|
||||||
get the siteurl using `curl http://localhost:4567/api/siteurl`.
|
get the siteurl using `curl http://localhost:4567/api/siteurl`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue