Skip to content

Commit

Permalink
Merge pull request #46 from JCWasmx86/master
Browse files Browse the repository at this point in the history
Bind HTTP server to localhost
  • Loading branch information
svenstaro authored Sep 26, 2023
2 parents fbbdc30 + f63a36a commit 71d7e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ int main(int argc, char* argv[])

mg_mgr_init(&mgr, NULL);
fmt::print("Starting web server on port {}\n", port);
nc = mg_bind_opt(&mgr, std::to_string(port).c_str(), ev_handler, bind_opts);
nc = mg_bind_opt(&mgr, fmt::format("localhost:{}", port).c_str(), ev_handler, bind_opts);
if (nc == NULL) {
return 1;
}
Expand Down

0 comments on commit 71d7e76

Please sign in to comment.