Skip to content

Commit 31ddfc8

Browse files
feat: update beast2 example.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
1 parent bbac676 commit 31ddfc8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

example/server/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ int server_main( int argc, char* argv[] )
8282
return http_proto::route::next;
8383
});
8484

85+
http_proto::helmet_options options;
86+
87+
options.set(http_proto::x_download_options(http_proto::helmet_download_type::noopen));
88+
options.set(http_proto::x_frame_origin(http_proto::helmet_origin_type::deny));
89+
8590
srv.wwwroot.use(
86-
http_proto::helmet(),
91+
http_proto::helmet(options),
8792
[] ( http_proto::route_params& ) ->
8893
http_proto::route_result
8994
{

0 commit comments

Comments
 (0)