We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b64bc65 commit bbac676Copy full SHA for bbac676
1 file changed
example/server/main.cpp
@@ -20,6 +20,7 @@
20
#include <boost/http_proto/request_parser.hpp>
21
#include <boost/http_proto/serializer.hpp>
22
#include <boost/http_proto/server/cors.hpp>
23
+#include <boost/http_proto/server/helmet.hpp>
24
#include <boost/capy/brotli/decode.hpp>
25
#include <boost/capy/brotli/encode.hpp>
26
#include <boost/capy/zlib/deflate.hpp>
@@ -80,7 +81,16 @@ int server_main( int argc, char* argv[] )
80
81
{
82
return http_proto::route::next;
83
});
- srv.wwwroot.use("/", serve_static( argv[3] ));
84
+
85
+ srv.wwwroot.use(
86
+ http_proto::helmet(),
87
+ [] ( http_proto::route_params& ) ->
88
+ http_proto::route_result
89
+ {
90
+ return http_proto::route::next;
91
+ });
92
93
+ srv.wwwroot.use("/", serve_static( argv[3] ));
94
95
app.start();
96
srv.attach();
0 commit comments