registry/internal/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
adam jones 6bb62d160e
fix: add HTTP middleware to redirect trailing slash URLs to canonical form (#420)
Resolves #419 where URLs with trailing slashes like `/v0/servers/` would
return empty responses instead of proper data.

**Changes**:
- Added TrailingSlashMiddleware that redirects trailing slash URLs with
301 status
- Preserves root path ('/') without redirecting
- Uses HTTP 301 Moved Permanently to indicate canonical form
- Added comprehensive test coverage for the middleware

This follows REST API best practices and is consistent with how major Go
web frameworks handle trailing slash normalization.

Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: adam jones <domdomegg@users.noreply.github.com>
2025-09-10 13:14:59 -07:00
..
handlers/v0 Improve publish permission error message to show available permissions (#417) 2025-09-10 12:28:22 -07:00
router feat: Add proper 404 error handling with helpful suggestions (#421) 2025-09-10 13:14:49 -07:00
server.go fix: add HTTP middleware to redirect trailing slash URLs to canonical form (#420) 2025-09-10 13:14:59 -07:00
server_test.go fix: add HTTP middleware to redirect trailing slash URLs to canonical form (#420) 2025-09-10 13:14:59 -07:00