Commit a281e996 authored by Sergey Lyubka's avatar Sergey Lyubka

calling auth handler wrapped in MONGOOSE_NO_AUTH

parent 170df7b6
......@@ -3365,12 +3365,14 @@ static void open_local_endpoint(struct connection *conn) {
const char *dir_lst = conn->server->config_options[ENABLE_DIRECTORY_LISTING];
#endif
#ifndef MONGOOSE_NO_AUTH
// Call auth handler
if (conn->server->auth_handler != NULL &&
conn->server->auth_handler(&conn->mg_conn) == 0) {
mg_send_digest_auth_request(&conn->mg_conn);
return;
}
#endif
// Call URI handler if one is registered for this URI
conn->endpoint.uh = find_uri_handler(conn->server, conn->mg_conn.uri);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment