ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
origin.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4
6
9static constexpr size_t MAX_ORIGIN_LENGTH = 127;
10
21bool is_origin_allowed(const char *origin, size_t origin_len, const char *host, size_t host_len,
22 const char *const *allowed);
23
24} // namespace esphome::web_server_base
static bool const char *const * allowed
const AsyncWebHeader * origin
char host[MAX_ORIGIN_LENGTH+1]
bool is_origin_allowed(const char *origin, size_t origin_len, const char *host, size_t host_len, const char *const *allowed)
Decide whether a browser request from the given Origin may reach a handler.
Definition origin.cpp:9