1
0
mirror of https://git.ikl.sh/132ikl/liteshort.git synced 2023-08-10 21:13:04 +03:00

Merge pull request #7 from Kevin-Mok/master

Add example API request
This commit is contained in:
132ikl 2019-09-04 13:08:55 -04:00 committed by GitHub
commit e2e7a623a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,15 @@ Everything other than creation of links requires BasicAuth using the username an
* `delete` * `delete`
* Deletes a URL. In the form data, set `short` to the short link you want to delete, or set `long` to delete all short links that redirect to the provided long link. * Deletes a URL. In the form data, set `short` to the short link you want to delete, or set `long` to delete all short links that redirect to the provided long link.
### Example Request
```
curl -u [admin_username]:[admin_password] \
-d 'format=json' \
-d 'api=delete' \
-d 'short=[short]' \
[url]
```
## Using a reverse proxy ## Using a reverse proxy
The following are barebones examples of an nginx proxy for liteshort, meaning it doesn't have SSL or anything fancy. You may also use a non-nginx webserver by making a config equivalent for it based upon the following configurations. Make sure your webserver is serving the /static/ folder. While liteshort can serve the folder, webservers are much more efficient at serving static files. The following are barebones examples of an nginx proxy for liteshort, meaning it doesn't have SSL or anything fancy. You may also use a non-nginx webserver by making a config equivalent for it based upon the following configurations. Make sure your webserver is serving the /static/ folder. While liteshort can serve the folder, webservers are much more efficient at serving static files.