No description
- Go 100%
| public | ||
| .gitignore | ||
| files.json | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
| server.go | ||
| test.png | ||
cdn-jmse-cloud
Simple Gin server with an image route group.
files.json format
{
"files": {
"items": [
{
"slug": "test123",
"path": "test.png",
"type": "image/png"
}
]
}
}
GET /images/:slug looks up files.items[].slug and serves the matching file.
The server also accepts GET /image/:slug as a compatibility alias.
If the URL includes an extension (for example /image/avatar-2024-modified.png),
the extension is stripped before slug matching.
Run
go test ./...
go run .