diff --git a/src/server/response.cpp b/src/server/response.cpp index aefa0dc7..f87ffecb 100644 --- a/src/server/response.cpp +++ b/src/server/response.cpp @@ -101,7 +101,8 @@ HTTPErrorHtmlResponse::HTTPErrorHtmlResponse(const InternalServer& server, const RequestContext& request, int httpStatusCode, const std::string& pageTitleMsg, - const std::string& headingMsg) + const std::string& headingMsg, + const std::string& cssUrl) : ContentResponseBlueprint(&server, &request, httpStatusCode, @@ -110,6 +111,7 @@ HTTPErrorHtmlResponse::HTTPErrorHtmlResponse(const InternalServer& server, { kainjow::mustache::list emptyList; this->m_data = kainjow::mustache::object{ + {"CSS_URL", onlyAsNonEmptyMustacheValue(cssUrl) }, {"PAGE_TITLE", pageTitleMsg}, {"PAGE_HEADING", headingMsg}, {"details", emptyList} diff --git a/src/server/response.h b/src/server/response.h index 710e2bc0..1c93434e 100644 --- a/src/server/response.h +++ b/src/server/response.h @@ -184,7 +184,8 @@ struct HTTPErrorHtmlResponse : ContentResponseBlueprint const RequestContext& request, int httpStatusCode, const std::string& pageTitleMsg, - const std::string& headingMsg); + const std::string& headingMsg, + const std::string& cssUrl = ""); using ContentResponseBlueprint::operator+; HTTPErrorHtmlResponse& operator+(const std::string& msg); diff --git a/static/templates/error.html b/static/templates/error.html index 5fcc0ff2..71108209 100644 --- a/static/templates/error.html +++ b/static/templates/error.html @@ -3,6 +3,9 @@