zachlatta / cdn

CDN microservice to upload files to zachlatta.com that only accepts traffic from Tailscale IPs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cdn

CDN microservice to upload files to zachlatta.com that only accepts traffic from Tailscale IPs.

source code available at https://github.com/zachlatta/cdn

config

the following env variables must be set:

  • FS_DEST_DIR - path on the filesystem to store files (ex. "/files")
  • BASE_URL - base URL to append filenames to when returning live URLs (ex. "https://zachlatta.com/f/")
  • ALLOWED_SUBNET - subnet to accept requests from (default: tailscale)

usage

POST file to "/upload" with "file" field name in multipart form

GET "/" -> return contents of README.md

About

CDN microservice to upload files to zachlatta.com that only accepts traffic from Tailscale IPs

License:MIT License


Languages

Language:Go 96.2%Language:Dockerfile 3.8%