#pragma once #include #include #include "blankie/serializer.h" struct Config; // forward declaration from config.h using Element = blankie::html::Element; void serve(const httplib::Request& req, httplib::Response& res, const Config& config, std::string title, Element element); void serve_error(const httplib::Request& req, httplib::Response& res, const Config& config, std::string title, std::optional subtitle = std::nullopt, std::optional info = std::nullopt); void serve_redirect(const httplib::Request& req, httplib::Response& res, const Config& config, std::string url); std::string get_origin(const httplib::Request& req, const Config& config);