添加项目文件。
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
#include "Export.h"
|
||||
#include "IPTable.h"
|
||||
#include "HTTPObjects.h"
|
||||
|
||||
class UNSWSC_DLL_EXPORT ServerProcessor
|
||||
{
|
||||
protected:
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> pimpl;
|
||||
|
||||
public:
|
||||
ServerProcessor();
|
||||
virtual ~ServerProcessor();
|
||||
|
||||
public:
|
||||
void EnableIPCheck();
|
||||
void DisableIPCheck();
|
||||
void UpdateBlockedIPList(IPTablePtr ips);
|
||||
void AppenedBlockedIP(DateTime::Span block_time, std::string ip);
|
||||
uns::HTTPMethod GetMethod(uns::RequestPtr request);
|
||||
void AddStreamSettings(std::string method, bool stream);
|
||||
|
||||
public:
|
||||
virtual uns::ResponsePtr Processor(uns::RequestPtr request) = 0;
|
||||
virtual uns::PathTraversalDefenceLevel PTDefence();
|
||||
virtual bool IsPathSafe(const std::string& raw_path);
|
||||
|
||||
public:
|
||||
uns::ResponsePtr Handle(uns::RequestPtr request);
|
||||
bool Stream(const std::string& method);
|
||||
};
|
||||
|
||||
using ServerProcessorPtr = std::shared_ptr<ServerProcessor>;
|
||||
Reference in New Issue
Block a user