v0.4.8 - Implement web server functionality for embedded admin interface - serve HTML/CSS/JS from /api/ endpoint with proper MIME types, CORS headers, and performance optimizations

This commit is contained in:
Your Name
2025-10-04 12:45:35 -04:00
parent 36c9c84047
commit 64b418a551
28 changed files with 10635 additions and 4289 deletions

20
src/api.h Normal file
View File

@@ -0,0 +1,20 @@
// API module for serving embedded web content
#ifndef API_H
#define API_H
#include <libwebsockets.h>
// Embedded file session data structure for managing buffer lifetime
struct embedded_file_session_data {
int type; // 1 for embedded file
const unsigned char* data;
size_t size;
const char* content_type;
int headers_sent;
int body_sent;
};
// Handle HTTP request for embedded API files
int handle_embedded_file_request(struct lws* wsi, const char* requested_uri);
#endif // API_H