File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,12 +184,19 @@ export interface PluginKVStore {
184184 ) : Promise < T | null > ;
185185}
186186
187+ /**
188+ * HTTP headers from the incoming request.
189+ * Each header name maps to an array of values (since HTTP headers can have multiple values).
190+ */
191+ export type PluginHeaders = Record < string , string [ ] > ;
192+
187193/**
188194 * Plugin context with KV always available for modern plugins.
189195 */
190196export interface PluginContext {
191197 api : PluginAPI ;
192198 kv : PluginKVStore ;
199+ headers : PluginHeaders ;
193200 params : any ;
194201}
195202
Original file line number Diff line number Diff line change @@ -184,13 +184,19 @@ export interface PluginKVStore {
184184 ) : Promise < T | null > ;
185185}
186186
187+ /**
188+ * HTTP headers from the incoming request.
189+ * Each header name maps to an array of values (since HTTP headers can have multiple values).
190+ */
191+ export type PluginHeaders = Record < string , string [ ] > ;
192+
187193/**
188194 * Plugin context with KV always available for modern plugins.
189195 */
190196export interface PluginContext {
191197 api : PluginAPI ;
192198 kv : PluginKVStore ;
193- // eslint-disable-next-line @typescript-eslint/no-explicit-any
199+ headers : PluginHeaders ;
194200 params : any ;
195201}
196202
You can’t perform that action at this time.
0 commit comments