commit | 6b5e77d6a2733b78bcbacb9f845f5763d1023e6d | [log] [tgz] |
---|---|---|
author | Ed Tanous <ed.tanous@intel.com> | Fri Nov 16 14:52:56 2018 -0800 |
committer | Ed Tanous <ed.tanous@intel.com> | Wed Dec 19 16:42:07 2018 +0000 |
tree | 3422483b174b4579bf70238c2f13091f8650c395 | |
parent | 02db306468d8e1f2b044b616841ffa93f25c7e5d [diff] [blame] |
bmcweb: support next= url for forwarding login Related to patchset here. This patchset implements the bmc side of redirecting the users URL after login correctly. https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/15925 Change-Id: Idf42f4cecd29fb0c6088721eb5e10fb39e1168e7 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/include/token_authorization_middleware.hpp b/include/token_authorization_middleware.hpp index c419c97..b186a5f 100644 --- a/include/token_authorization_middleware.hpp +++ b/include/token_authorization_middleware.hpp
@@ -63,7 +63,8 @@ if (http_helpers::requestPrefersHtml(req)) { res.result(boost::beast::http::status::temporary_redirect); - res.addHeader("Location", "/#/login"); + res.addHeader("Location", "/#/login?next=" + + http_helpers::urlEncode(req.url)); } else {