#pragma once #include #include #include namespace cors_preflight { inline void requestRoutes(App& app) { BMCWEB_ROUTE(app, "") .methods(boost::beast::http::verb::options)( [](const crow::Request&, crow::Response& res, const std::string&) { // An empty body handler that simply returns the headers bmcweb // uses This allows browsers to do their CORS preflight checks res.end(); }); } } // namespace cors_preflight