libwebsockets
Lightweight C library for HTML5 websockets
Vhost mounts and options

Data Structures

struct  lws_protocol_vhost_options
 
struct  lws_http_mount
 

Macros

#define AUTH_MODE_MASK   0xF0000000
 

Enumerations

enum  lws_mount_protocols {
  LWSMPRO_HTTP = 0, LWSMPRO_HTTPS = 1, LWSMPRO_FILE = 2, LWSMPRO_CGI = 3,
  LWSMPRO_REDIR_HTTP = 4, LWSMPRO_REDIR_HTTPS = 5, LWSMPRO_CALLBACK = 6
}
 
enum  lws_authentication_mode { LWSAUTHM_DEFAULT = 0, LWSAUTHM_BASIC_AUTH_CALLBACK = 1 << 28 }
 

Detailed Description

Vhost mounts and options

Macro Definition Documentation

◆ AUTH_MODE_MASK

#define AUTH_MODE_MASK   0xF0000000

#include <include/libwebsockets/lws-context-vhost.h>

The authentication mode is stored in the top 4 bits of lws_http_mount.auth_mask

Enumeration Type Documentation

◆ lws_authentication_mode

#include <include/libwebsockets/lws-context-vhost.h>

enum lws_authentication_mode This specifies the authentication mode of the mount. The basic_auth_login_file mount parameter is ignored unless LWSAUTHM_DEFAULT is set.

Enumerator
LWSAUTHM_DEFAULT 

default authenticate only if basic_auth_login_file is provided

LWSAUTHM_BASIC_AUTH_CALLBACK 

Basic auth with a custom verifier

1074  {
1075  LWSAUTHM_DEFAULT = 0,
1076  LWSAUTHM_BASIC_AUTH_CALLBACK = 1 << 28
1077 };

◆ lws_mount_protocols

#include <include/libwebsockets/lws-context-vhost.h>

enum lws_mount_protocols This specifies the mount protocol for a mountpoint, whether it is to be served from a filesystem, or it is a cgi etc.

Enumerator
LWSMPRO_HTTP 

http reverse proxy

LWSMPRO_HTTPS 

https reverse proxy

LWSMPRO_FILE 

serve from filesystem directory

LWSMPRO_CGI 

pass to CGI to handle

LWSMPRO_REDIR_HTTP 

redirect to http:// url

LWSMPRO_REDIR_HTTPS 

redirect to https:// url

LWSMPRO_CALLBACK 

hand by named protocol's callback

1060  {
1061  LWSMPRO_HTTP = 0,
1062  LWSMPRO_HTTPS = 1,
1063  LWSMPRO_FILE = 2,
1064  LWSMPRO_CGI = 3,
1065  LWSMPRO_REDIR_HTTP = 4,
1066  LWSMPRO_REDIR_HTTPS = 5,
1067  LWSMPRO_CALLBACK = 6,
1068 };
LWSMPRO_HTTPS
@ LWSMPRO_HTTPS
Definition: lws-context-vhost.h:1062
LWSMPRO_CGI
@ LWSMPRO_CGI
Definition: lws-context-vhost.h:1064
LWSMPRO_CALLBACK
@ LWSMPRO_CALLBACK
Definition: lws-context-vhost.h:1067
LWSMPRO_HTTP
@ LWSMPRO_HTTP
Definition: lws-context-vhost.h:1061
LWSMPRO_REDIR_HTTP
@ LWSMPRO_REDIR_HTTP
Definition: lws-context-vhost.h:1065
LWSAUTHM_BASIC_AUTH_CALLBACK
@ LWSAUTHM_BASIC_AUTH_CALLBACK
Definition: lws-context-vhost.h:1076
LWSMPRO_FILE
@ LWSMPRO_FILE
Definition: lws-context-vhost.h:1063
LWSAUTHM_DEFAULT
@ LWSAUTHM_DEFAULT
Definition: lws-context-vhost.h:1075
LWSMPRO_REDIR_HTTPS
@ LWSMPRO_REDIR_HTTPS
Definition: lws-context-vhost.h:1066