新增http api与http文件访问ip白名单限制机制,默认禁止公网访问

This commit is contained in:
xia-chu
2023-07-26 16:33:21 +08:00
parent e8f8b48d38
commit 098046cb1d
6 changed files with 77 additions and 2 deletions

View File

@@ -62,6 +62,13 @@ public:
* @return mime值
*/
static const std::string &getContentType(const char *name);
/**
* 该ip是否再白名单中
* @param ip 支持ipv4和ipv6
*/
static bool isIPAllowed(const std::string &ip);
private:
HttpFileManager() = delete;
~HttpFileManager() = delete;