Loading src/blogi.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MAX_RETRIES 5 static std::string cookieDomain(libhttppp::HttpRequest &req) std::string blogi::cookieDomain(libhttppp::HttpRequest &req) { std::string h; auto *fwd = req.getHeaderData("x-forwarded-host"); Loading src/blogi.h +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace blogi { // Derives the cookie "Domain" attribute from a request (X-Forwarded-Host // aware). Exposed (not blogi.cpp-local) so plugins that need to set their // own cookies -- e.g. a plugin persisting a session id in its own HTTP // response instead of blogi's shared one, see schimmeldoc's login -- can // reuse the same logic instead of duplicating/drifting from it. std::string cookieDomain(libhttppp::HttpRequest &req); struct DomainContext { std::string domainName; std::string prefix; Loading Loading
src/blogi.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MAX_RETRIES 5 static std::string cookieDomain(libhttppp::HttpRequest &req) std::string blogi::cookieDomain(libhttppp::HttpRequest &req) { std::string h; auto *fwd = req.getHeaderData("x-forwarded-host"); Loading
src/blogi.h +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace blogi { // Derives the cookie "Domain" attribute from a request (X-Forwarded-Host // aware). Exposed (not blogi.cpp-local) so plugins that need to set their // own cookies -- e.g. a plugin persisting a session id in its own HTTP // response instead of blogi's shared one, see schimmeldoc's login -- can // reuse the same logic instead of duplicating/drifting from it. std::string cookieDomain(libhttppp::HttpRequest &req); struct DomainContext { std::string domainName; std::string prefix; Loading