mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-29 21:08:24 +00:00
Add ability to enumerate endpoints
This commit is contained in:
1 parent
a350208f35
commit
e3a140c9a7
4 files changed
+56
-26
No files matched your search
+21
@@ -5184,6 +5184,27 @@ void mg_register_http_endpoint_opt(struct mg_connection *nc,
|
||||
mg_event_handler_t handler,
|
||||
struct mg_http_endpoint_opts opts);
|
||||
|
||||
/*
|
||||
* HTTP endpoint descriptor.
|
||||
*/
|
||||
struct mg_http_endpoint {
|
||||
struct mg_http_endpoint *next;
|
||||
struct mg_str uri_pattern; /* owned */
|
||||
char *auth_domain; /* owned */
|
||||
char *auth_file; /* owned */
|
||||
enum mg_auth_algo auth_algo;
|
||||
|
||||
mg_event_handler_t handler;
|
||||
#if MG_ENABLE_CALLBACK_USERDATA
|
||||
void *user_data;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* Returns first registered endpoint.
|
||||
*/
|
||||
struct mg_http_endpoint *mg_get_http_endpoints(struct mg_connection *nc);
|
||||
|
||||
/*
|
||||
* Sends 401 Unauthorized response.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user