GoMFT Release Notes
Release Notes - v0.2.3
🚀 Improvements
- Enhanced Static File Handling: Improved how static files are served with proper content types and caching headers
- Fixed UI Issues: Resolved issues with CSS and JavaScript loading in Docker containers
- Build System Improvements: Enhanced build process for both local and Docker builds
🔧 Technical Changes
Static File Handling
- Added proper content type detection for different file types (JS, CSS, images, fonts)
- Implemented caching headers for static assets
- Separated static file handling from general file serving
- Fixed issues with embedded files in Docker builds
Build System
- Updated Dockerfile to properly handle frontend asset building
- Added Node.js build steps to GitHub Actions workflows
- Improved asset embedding in Go binary
- Ensured consistent build process across all environments
CI/CD Improvements
- Added Node.js setup and build steps to DockerHub workflow
- Added Node.js setup and build steps to GitHub Container Registry workflow
- Added verification steps for built assets
- Improved build caching for faster deployments
🔍 Technical Details
Static File Changes
// Added proper content type handling
func setContentType(c *gin.Context, path string) {
switch {
case strings.HasSuffix(path, ".js"):
c.Header("Content-Type", "application/javascript")
case strings.HasSuffix(path, ".css"):
c.Header("Content-Type", "text/css")
// ... other types ...
}
}
// Added caching headers
func setCacheHeaders(c *gin.Context, path string) {
if strings.HasSuffix(path, ".js") || strings.HasSuffix(path, ".css") {
c.Header("Cache-Control", "public, max-age=31536000")
}
// ... other rules ...
}
📝 Notes
- Local builds continue to work as before, just run
node build.js
beforego build
- Docker builds now handle asset building automatically
- CI/CD pipelines automatically build and verify frontend assets
🔄 Migration
No migration steps required. The changes are backward compatible and will take effect automatically after updating.
🐛 Bug Fixes
- Fixed FTP issue where port was not being added to config
- Fixed FTP/SFTP issue where default ports were not working correctly
- Fixed Webdav config error caused by form fields
- Fixed UI styling issues in Docker containers
- Fixed content type issues with static files
- Fixed caching headers for static assets
- Fixed asset embedding in Docker builds
📦 Dependencies
- Node.js v20
- Go 1.24
- Alpine 3.19 (Docker base image)