commit | 26ccae32112679c4653c1e3f8a1203c828bea05c | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Thu Feb 16 10:28:44 2023 -0800 |
committer | Ed Tanous <ed@tanous.net> | Fri Feb 24 17:21:14 2023 +0000 |
tree | a87d5056294e163b9ddeed9e867bcfb0750a8bb5 | |
parent | 7da1c58890e82194ff83ca6c8d55b5c327f2444a [diff] [blame] |
Pass string views by value string_view should always be passed by value; This commit is a sed replace of the code to make all string_views pass by value, per general coding guidelines[1]. [1] https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/ Tested: Code compiles. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I55b342a29a0fbfce0a4ed9ea63db6014d03b134c
diff --git a/include/security_headers.hpp b/include/security_headers.hpp index d724de4..9877bb0 100644 --- a/include/security_headers.hpp +++ b/include/security_headers.hpp
@@ -58,7 +58,7 @@ "object-src *; " "base-uri *"); - const std::string_view origin = req.getHeaderValue("Origin"); + std::string_view origin = req.getHeaderValue("Origin"); res.addHeader(bf::access_control_allow_origin, origin); res.addHeader(bf::access_control_allow_methods, "GET, " "POST, "