| 4813 | } |
| 4814 | |
| 4815 | inline bool Server::set_mount_point(const std::string &mount_point, |
| 4816 | const std::string &dir, Headers headers) { |
| 4817 | if (detail::is_dir(dir)) { |
| 4818 | std::string mnt = !mount_point.empty() ? mount_point : "/"; |
| 4819 | if (!mnt.empty() && mnt[0] == '/') { |
| 4820 | base_dirs_.push_back({mnt, dir, std::move(headers)}); |
| 4821 | return true; |
| 4822 | } |
| 4823 | } |
| 4824 | return false; |
| 4825 | } |
| 4826 | |
| 4827 | inline bool Server::remove_mount_point(const std::string &mount_point) { |
| 4828 | for (auto it = base_dirs_.begin(); it != base_dirs_.end(); ++it) { |