Refactor server configuration management

- Removed old server configuration files (server.json, server.log, server_config.c, server_config.h).
- Introduced a new configuration file (server.conf) with a more structured format.
- Implemented a configuration parser (config_parser.c) to read and apply settings from server.conf.
- Updated server logic to utilize the new configuration structure.
- Enhanced logging functionality and added rate limiting features.
- Improved error handling and security measures in request processing.
This commit is contained in:
2025-10-02 18:57:05 +00:00
parent a34ae2a43e
commit c9ac352bb4
10 changed files with 192 additions and 141 deletions

23
server.conf Normal file
View File

@@ -0,0 +1,23 @@
# Carbon Web Server Configuration File
# Lines starting with # are comments
# Server listening port
port = 8080
# Enable HTTPS (requires valid certificates in certs/ directory)
use_https = false
# Log file location
log_file = log/server.log
# Maximum number of worker threads
max_threads = 4
# Server running state
running = true
# Server name or IP address (used for logging and response headers)
server_name = 10.0.0.206
# Enable verbose logging
verbose = true