Refactor Gemini protocol implementation and improve server architecture
- Move gemini URL parsing from common/ to gemini/ package - Add structured status codes in gemini/status_codes.go - Improve error handling with proper Gemini status codes - Update configuration field naming (Listen -> ListenAddr) - Add UTF-8 validation for URLs - Enhance security with better path validation - Add CLAUDE.md for development guidance - Include example content in srv/ directory - Update build system to use standard shell
This commit is contained in:
@@ -14,7 +14,7 @@ type Config struct {
|
||||
ResponseTimeout int // Timeout for responses in seconds
|
||||
RootPath string // Path to serve files from
|
||||
DirIndexingEnabled bool // Allow client to browse directories or not
|
||||
Listen string // Address to listen on
|
||||
ListenAddr string // Address to listen on
|
||||
}
|
||||
|
||||
var CONFIG Config //nolint:gochecknoglobals
|
||||
@@ -64,6 +64,6 @@ func GetConfig() *Config {
|
||||
ResponseTimeout: *responseTimeout,
|
||||
RootPath: *rootPath,
|
||||
DirIndexingEnabled: *dirIndexing,
|
||||
Listen: *listen,
|
||||
ListenAddr: *listen,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user