Missing streaming, so git's a bit confused, but works. Also easy to bypass. Although I doubt any mf at alibaba gon bypass it with his custom UA.
20 lines
503 B
C++
20 lines
503 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
class CConfig {
|
|
public:
|
|
CConfig();
|
|
|
|
struct SConfig {
|
|
int port = 3001;
|
|
std::string forward_address = "127.0.0.1:3000";
|
|
std::string data_dir = "";
|
|
std::string html_dir = "";
|
|
unsigned long int max_request_size = 10000000; // 10MB
|
|
bool git_host = false;
|
|
} m_config;
|
|
};
|
|
|
|
inline std::unique_ptr<CConfig> g_pConfig; |