We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ac5e31 commit 0934b51Copy full SHA for 0934b51
1 file changed
examples/server/main.cpp
@@ -1628,6 +1628,11 @@ void start_server(SDParams params) {
1628
}
1629
});
1630
1631
+ // redirect base url to index
1632
+ svr->Get("/", [](const httplib::Request& req, httplib::Response& res) {
1633
+ res.set_redirect("/index.html");
1634
+ });
1635
+
1636
// bind HTTP listen port, run the HTTP server in a thread
1637
if (!svr->bind_to_port(params.host, params.port)) {
1638
// TODO: Error message
0 commit comments