aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/http_server.h')
-rw-r--r--include/http_server.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/http_server.h b/include/http_server.h
index 484aa83..32e0e42 100644
--- a/include/http_server.h
+++ b/include/http_server.h
@@ -22,12 +22,13 @@ namespace crow
class Server
{
public:
- Server(Handler* handler, uint16_t port, uint16_t concurrency = 1)
+ Server(Handler* handler, uint16_t port, std::tuple<Middlewares...>* middlewares = nullptr, uint16_t concurrency = 1)
: acceptor_(io_service_, tcp::endpoint(asio::ip::address(), port)),
signals_(io_service_, SIGINT, SIGTERM),
handler_(handler),
concurrency_(concurrency),
- port_(port)
+ port_(port),
+ middlewares_(middlewares)
{
}
@@ -120,7 +121,6 @@ namespace crow
uint16_t port_;
unsigned int roundrobin_index_{};
- std::tuple<Middlewares...> middlewares_;
-
+ std::tuple<Middlewares...>* middlewares_;
};
}