Features: - URL shortener with QR codes, click tracking, deduplication, rate limiting - Pastebin with Markdown rendering, access tokens, raw view - Admin dashboard: dark theme, stats bar, Quick Links tiles with favicons, card-based layout, format/token badges, empty states - CSRF protection, bcrypt auth, in-memory sessions, security headers - Pure-Go SQLite (no CGo), single self-contained binary Deploy: - deploy/install.sh: auto-detects systemd vs SysV init - deploy/urlshort.service: hardened systemd unit - deploy/urlshort.init: SysV init script for older Ubuntu Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
21 lines
422 B
TOML
21 lines
422 B
TOML
# URL Shortener Configuration
|
|
|
|
[server]
|
|
port = 8888
|
|
base_url = "http://localhost:8888"
|
|
read_timeout = "5s"
|
|
write_timeout = "10s"
|
|
|
|
[admin]
|
|
username = "admin"
|
|
# Default password: "admin" — change this!
|
|
# Generate a new hash: ./urlshort --hash-password "your-password"
|
|
password_hash = "$2a$10$WXBoF7ZB7fIRl5smdGH9seqlNbXWiCS7ZbGNk0ONb9xjS8499gBpu"
|
|
session_hours = 24
|
|
|
|
[database]
|
|
path = "./data/urls.db"
|
|
|
|
[slugs]
|
|
length = 3
|