Skip to content

Commit cca3322

Browse files
feat: update server example with updated SP api.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
1 parent 2505fd7 commit cca3322

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

example/server/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ int server_main( int argc, char* argv[] )
8787
options.set(http_proto::x_download_options(http_proto::helmet_download_type::noopen));
8888
options.set(http_proto::x_frame_origin(http_proto::helmet_origin_type::deny));
8989

90-
std::vector<std::string> allow_list;
90+
http_proto::sp::allow_list allow_list;
9191

92-
http_proto::sp::append(allow_list, "script-src", http_proto::sp::allow_type::self);
93-
http_proto::sp::append(allow_list, "object-src", http_proto::sp::allow_type::none);
92+
http_proto::sp::push_back(allow_list, "script-src", http_proto::sp::allow_type::self);
93+
http_proto::sp::push_back(allow_list, "object-src", http_proto::sp::allow_type::none);
9494

9595
options.set(http_proto::content_security_policy(allow_list));
9696

0 commit comments

Comments
 (0)