Bug fixing

This commit is contained in:
Your Name
2025-05-25 15:05:01 +12:00
parent 3cffb6cd94
commit 27acc9f9f0
7 changed files with 125 additions and 9 deletions

View File

@@ -17,6 +17,9 @@ struct ServerConfig {
std::vector<std::string> allowed_methods = {"GET", "PUT", "POST", "DELETE", "OPTIONS"};
std::vector<std::string> allowed_headers = {"Authorization", "Content-Type"};
bool allow_credentials = false;
// Rate limiting configuration
int auth_rate_limit = 5; // Maximum number of auth attempts
int auth_window_seconds = 10; // Time window in seconds (10 seconds)
};
bool load_config(const std::string& config_path, ServerConfig& config);