π A lightweight Go server that authenticates requests through a remote server and serves static images from the file system.
- β simple, secure access to local images based on external authentication π
- β
supports
.png,.jpg, and.jpegformats πΌοΈ - β blazing fast with Go and zero dependencies ποΈ
- β customizable via environment variables π οΈ
- Place your image files into a directory mounted into the container (or accessible on host).
- Start the app with Docker:
docker run -p 8080:8080 \
-e AUTH_SERVER_BASE_URL="http://your-auth-server.local/auth" \
-v $(pwd)/images:/app/static \
ghcr.io/tobiasz-gleba/image-hosting-with-forwarded-authNow you can:
GET http://localhost:8080/cats/image1.jpgAnd it will:
- Forward request to:
http://your-auth-server.local/auth/cats/image1.jpg - If 200 OK β return
cats/image1.pngor.jpgor.jpeg - If not β return 401 Unauthorized
AUTH_SERVER_BASE_URL=http://localhost:8081/auth
STATIC_DIR=/app/static- Private photo hosting
- Auth-gated image previews
- Secure image CDN