feat(web): render canonical living hedge maze walls
This commit is contained in:
@@ -20,6 +20,7 @@ static const maze32_static_asset_t PLAYER_STYLE_ASSET = {"/littlefs/player.css.g
|
||||
static const maze32_static_asset_t PLAYER_SCRIPT_ASSET = {"/littlefs/player.js.gz",
|
||||
"text/javascript; charset=utf-8"};
|
||||
static const maze32_static_asset_t ICON_ASSET = {"/littlefs/icons.svg.gz", "image/svg+xml"};
|
||||
static const maze32_static_asset_t HEDGE_ASSET = {"/littlefs/hedges.svg.gz", "image/svg+xml"};
|
||||
|
||||
static void preserve_static_context(void* context) {
|
||||
(void)context;
|
||||
@@ -104,7 +105,7 @@ esp_err_t maze32_web_start(httpd_handle_t* server, maze32_health_t* health,
|
||||
}
|
||||
|
||||
httpd_config_t configuration = HTTPD_DEFAULT_CONFIG();
|
||||
configuration.max_uri_handlers = 13;
|
||||
configuration.max_uri_handlers = 14;
|
||||
configuration.max_open_sockets = 9;
|
||||
configuration.lru_purge_enable = false;
|
||||
configuration.recv_wait_timeout = 5;
|
||||
@@ -148,6 +149,12 @@ esp_err_t maze32_web_start(httpd_handle_t* server, maze32_health_t* health,
|
||||
.handler = send_static_asset,
|
||||
.user_ctx = (void*)&ICON_ASSET,
|
||||
};
|
||||
const httpd_uri_t hedges = {
|
||||
.uri = "/hedges.svg",
|
||||
.method = HTTP_GET,
|
||||
.handler = send_static_asset,
|
||||
.user_ctx = (void*)&HEDGE_ASSET,
|
||||
};
|
||||
const httpd_uri_t health_uri = {
|
||||
.uri = "/health",
|
||||
.method = HTTP_GET,
|
||||
@@ -174,6 +181,9 @@ esp_err_t maze32_web_start(httpd_handle_t* server, maze32_health_t* health,
|
||||
if (result == ESP_OK) {
|
||||
result = httpd_register_uri_handler(*server, &icons);
|
||||
}
|
||||
if (result == ESP_OK) {
|
||||
result = httpd_register_uri_handler(*server, &hedges);
|
||||
}
|
||||
if (result == ESP_OK) {
|
||||
result = httpd_register_uri_handler(*server, &health_uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user