- Notifications
You must be signed in to change notification settings - Fork2
🔗 Personal link shortener that uses an NGINX-compatible map file as a config
License
statico/statico.link
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
statico.link /ianl.link short URLs
Why? I wanted an easy way to paste URLs that I use and share a lot.
How? This started as a simple NGINX redirect maplike this because I already run NGINX for other things and wanted the simplest thing possible. Then people wanted an index page, and then the ipdata.co free API stopped working, so I made it a tiny service that would parse the existing config file.
What else? The site is marked noindex, nofollow to prevent crawling. Redirects are sent with aReferrer-Policy: unsafe-url
header for reasons that I think sounded smart at the time but I'm too lazy to look up right now.
Keys should be whole words. The server strips all hyphens from the key so that you can add a link likefoobarbaz https://... ;
and then pastehttps://your.links/foo-bar-baz
into chat to make it more readable.
The link config file is a simple file full of lines in this format, which is compatible with NGINX for the above historical reasons:
<key> <url> ;
Or, for links you want to work but don't want to list on the page,
<key> <url> ; # private
Configure the following env vars either through Docker or a.env
file or whatever:
PORT
- Port number to listen on, defaults to 5000IPDATA_KEY
- Get an API key fromhttps://dashboard.ipdata.co/api.htmlLINKS_CONF
- Path to the links config file (see above)BASE_URL
- Base URL likehttps://cool.link/
TITLE
- Title to appear on the pageDESCRIPTION
- Byline to appear on the pageGITHUB_URL
- Link to this page
Get a recent Node.js and Yarn and run:
$ yarn install$ yarn global add nodemon$ nodemon
$ docker build . --tag ghcr.io/statico/statico.link
Etc.
MIT
About
🔗 Personal link shortener that uses an NGINX-compatible map file as a config