summaryrefslogtreecommitdiffhomepage
path: root/response.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'response.cpp')
-rw-r--r--response.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/response.cpp b/response.cpp
index 52081f6..51c9603 100644
--- a/response.cpp
+++ b/response.cpp
@@ -123,6 +123,8 @@ std::unordered_map<std::string, std::function<std::string(RequestContext&)>> Get
return "HTTP/"s + std::to_string(major) + "."s + std::to_string(minor);
}},
+ {"https", [](RequestContext& req_ctx) { return req_ctx.GetSocket().protocol == SocketProtocol::HTTPS ? "on" : "off"; }},
+
{"location", [](RequestContext& req_ctx) { return req_ctx.GetTarget(); }},
{"method", [](RequestContext& req_ctx) { return std::string{req_ctx.GetReq().method_string()};}},