mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
PEER_LIMITS: add lejp-conf
This commit is contained in:
parent
0fb976837b
commit
3452980391
1 changed files with 12 additions and 0 deletions
|
@ -45,6 +45,8 @@ static const char * const paths_global[] = {
|
|||
"global.reject-service-keywords[].*",
|
||||
"global.reject-service-keywords[]",
|
||||
"global.default-alpn",
|
||||
"global.ip-limit-ah",
|
||||
"global.ip-limit-wsi",
|
||||
};
|
||||
|
||||
enum lejp_global_paths {
|
||||
|
@ -61,6 +63,8 @@ enum lejp_global_paths {
|
|||
LWJPGP_REJECT_SERVICE_KEYWORDS_NAME,
|
||||
LWJPGP_REJECT_SERVICE_KEYWORDS,
|
||||
LWJPGP_DEFAULT_ALPN,
|
||||
LWJPGP_IP_LIMIT_AH,
|
||||
LWJPGP_IP_LIMIT_WSI,
|
||||
};
|
||||
|
||||
static const char * const paths_vhosts[] = {
|
||||
|
@ -332,6 +336,14 @@ lejp_globals_cb(struct lejp_ctx *ctx, char reason)
|
|||
a->info->alpn = a->p;
|
||||
break;
|
||||
|
||||
case LWJPGP_IP_LIMIT_AH:
|
||||
a->info->ip_limit_ah = atoi(ctx->buf);
|
||||
return 0;
|
||||
|
||||
case LWJPGP_IP_LIMIT_WSI:
|
||||
a->info->ip_limit_wsi = atoi(ctx->buf);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue