#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& /*req*/, const std::shared_ptr&, const std::string&) { // An empty body handler that simply returns the headers bmcweb // uses This allows browsers to do their CORS preflight checks }); } } // namespace cors_preflight