Skip to content

Commit 40f4977

Browse files
committed
feat: cors in example
1 parent 2d7f0c2 commit 40f4977

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

example/server/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <boost/capy/application.hpp>
2020
#include <boost/http_proto/request_parser.hpp>
2121
#include <boost/http_proto/serializer.hpp>
22+
#include <boost/http_proto/server/cors.hpp>
2223
#include <boost/capy/brotli/decode.hpp>
2324
#include <boost/capy/brotli/encode.hpp>
2425
#include <boost/capy/zlib/deflate.hpp>
@@ -71,8 +72,9 @@ int server_main( int argc, char* argv[] )
7172
//srv.wwwroot.use("/log", serve_log_admin(app));
7273
//srv.wwwroot.use("/alt", serve_static( argv[3] ));
7374
//srv.wwwroot.use("/detach", serve_detached());
74-
srv.wwwroot.use(post_work());
75+
//srv.wwwroot.use(post_work());
7576
srv.wwwroot.use(
77+
http_proto::cors(),
7678
[]( http_proto::Request& req,
7779
http_proto::Response& res) ->
7880
http_proto::route_result

0 commit comments

Comments
 (0)