Skip to content

Commit

Permalink
chore(pull): remove pre v1.14 civetweb work-around
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Dec 27, 2023
1 parent 8438ebd commit 6c161e5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pull/src/endpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
namespace prometheus {
namespace detail {

namespace {
class AlwaysAllowAccessHandler : public CivetAuthHandler {
bool authorize(CivetServer*, struct mg_connection*) override { return true; }
};

AlwaysAllowAccessHandler alwaysAllowAccessHandler;
} // namespace

Endpoint::Endpoint(CivetServer& server, std::string uri)
: server_(server),
uri_(std::move(uri)),
Expand All @@ -30,9 +22,7 @@ Endpoint::Endpoint(CivetServer& server, std::string uri)
Endpoint::~Endpoint() {
server_.removeHandler(uri_);
if (auth_handler_) {
// work-around https://github.com/civetweb/civetweb/issues/941
// server_.removeAuthHandler(uri_);
server_.addAuthHandler(uri_, alwaysAllowAccessHandler);
server_.removeAuthHandler(uri_);
}
}

Expand Down

0 comments on commit 6c161e5

Please sign in to comment.