/* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "esp_err.h" #include "esp_http_server.h" #ifdef __cplusplus extern "C" { #endif /** @brief Start the HTTP server on port 80 (UI and JSON API). */ esp_err_t web_start(void); /** * @brief Add Access-Control-Allow-Origin for a LAN or localhost page that asked (the Origin header). * Call before the response is sent. Other origins get no header, so the browser blocks them. */ void web_allow_lan_origin(httpd_req_t *req); #ifdef __cplusplus } #endif