From 04fa96b7c0abba4d7cca03ed12ff3b65b3912e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 13 Aug 2022 01:23:32 +0800 Subject: fix #1431 --- meta/3rd/OpenResty/library/ngx/resp.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 meta/3rd/OpenResty/library/ngx/resp.lua (limited to 'meta/3rd/OpenResty/library/ngx/resp.lua') diff --git a/meta/3rd/OpenResty/library/ngx/resp.lua b/meta/3rd/OpenResty/library/ngx/resp.lua new file mode 100644 index 00000000..c2de299a --- /dev/null +++ b/meta/3rd/OpenResty/library/ngx/resp.lua @@ -0,0 +1,23 @@ +---@meta +local resp={} + +resp.version = require("resty.core.base").version + +--- This function adds specified header with corresponding value to the response of current request. +--- +--- The `header_value` could be either a string or a table. +--- +--- The ngx.resp.add_header works mostly like: +--- +--- `ngx.header.HEADER` +--- Nginx's `add_header` directive. +--- +--- However, unlike `ngx.header.HEADER`, this method appends new header to the old one instead of overriding it. +--- +--- Unlike `add_header` directive, this method will override the builtin header instead of appending it. +--- +---@param key string +---@param value string|string[] +function resp.add_header(key, value) end + +return resp \ No newline at end of file -- cgit v1.2.3