Bug fixing

This commit is contained in:
Your Name
2025-05-25 14:48:05 +12:00
parent d849aa73f4
commit 3cffb6cd94
5 changed files with 98 additions and 1 deletions

View File

@@ -12,6 +12,11 @@ struct ServerConfig {
std::filesystem::path object_store_path;
std::string host = "0.0.0.0";
uint16_t port = 0;
// CORS configuration
std::vector<std::string> allowed_origins = {"*"}; // Default to allow all origins
std::vector<std::string> allowed_methods = {"GET", "PUT", "POST", "DELETE", "OPTIONS"};
std::vector<std::string> allowed_headers = {"Authorization", "Content-Type"};
bool allow_credentials = false;
};
bool load_config(const std::string& config_path, ServerConfig& config);