add: file handling with 404

This commit is contained in:
Tobias Reisinger 2020-06-03 00:47:49 +02:00
parent 865caa627e
commit 20d38730c9
8 changed files with 157 additions and 83 deletions

View file

@ -30,6 +30,10 @@ typedef struct
run_type_t run_type;
char server_port[6];
uint16_t discovery_port;
char *not_found_file;
char *not_found_file_type;
char *not_found_content;
char *not_found_content_type;
struct mg_serve_http_opts http_server_opts;
} config_t;

View file

@ -15,6 +15,9 @@ typedef enum
HTTP_METHOD_OPTIONS = (1 << 4)
} http_method_e;
endpoint_t*
router_get_not_found_endpoint();
void
router_init();