#pragma once #include "HttpServer.hpp" #include "../Filesystem/VFSFix.hpp" #include "../Filesystem/VFS.hpp" namespace Tesses::Framework::Http { class MountableServer : public IHttpServer { std::shared_ptr root; std::vector>> servers; std::string Subpath(Filesystem::VFSPath fullPath, Filesystem::VFSPath offsetPath); bool StartsWith(Filesystem::VFSPath fullPath, Filesystem::VFSPath offsetPath); public: MountableServer(); MountableServer(std::shared_ptr root); void Mount(std::string path, std::shared_ptr server); void Unmount(std::string path); bool Handle(ServerContext& ctx); ~MountableServer(); }; }