Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diffra/Lard
Lard: A Redirect Daemon
https://github.com/diffra/Lard
Last synced: 12 days ago
JSON representation
Lard: A Redirect Daemon
- Host: GitHub
- URL: https://github.com/diffra/Lard
- Owner: diffra
- License: gpl-2.0
- Created: 2023-02-09T04:02:06.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-24T00:59:17.000Z (8 months ago)
- Last Synced: 2024-02-27T04:37:22.393Z (4 months ago)
- Language: HTML
- Size: 62.5 KB
- Stars: 28
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - Lard
README
# LARD: A Redirect Daemon
```
Redirecting flows
LARD smoothly guides the way
URLs find a path
```## Overview
LARD is a redirect daemon that can be used to redirect incoming HTTP requests to different URLs.
![user interface](https://raw.githubusercontent.com/diffra/Lard/master/Interface.png)
## Usage
To use LARD, it is strongly recommended to use docker-compose.
```
version: '3'
services:
lard:
image: diffra/lard
# other service configuration
ports:
- "8002:8000" # port mapping
volumes:
- "./data:/data" # config directory for LARD
```## Configuration
The configuration for the application is stored in the file `./data/config.ini`. Create the folder 'data' and config.ini file within. The contents should look like this:
```
[General]
baseurl = https://l.yourdomain.com
length = 5[Auth]
password = lard
#bcrypted admin:password
#To generate a username:password string, see: https://hostingcanada.org/htpasswd-generator/ or run `htpasswd -nBC 10 admin`
admin = admin:$2y$10$TGVz8YgPBXggJAf.BjOjHeMls59VXI7g7bGLLX9zF4uvHJcM8nKjG```
The following sections and options are available:
### General
- `baseurl`: the base URL for the service.
- `length`: the length for shortened URL.### Auth
- `password`: the password to create a new link.## Endpoints
### `GET /`
This endpoint returns a simple HTML page with a form.
### `GET /admin`
This password-protected HTML endpoint returns a list of links within the system with delete capability.
### `POST /create`
This endpoint allows you to create a new redirect. The following parameters are supported:
- `url`: The URL to redirect to.
- `key`: The password### `DELETE /delete/{id}`
This endpoint deletes an existing link:
{id} is the database id of the link to be deleted.
Requires same auth as admin
HTML/CSS layout thanks to Smart Developers.