Skip to content

Commit 2fb8f12

Browse files
bjoe2k4tokers
authored andcommitted
feature: added support for the Nginx builtin Link header.
This allows for specifying multiple values in the Link header. Co-authored-by: tokers <zchao1995@gmail.com> Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
1 parent 248060b commit 2fb8f12

File tree

2 files changed

+182
-50
lines changed

2 files changed

+182
-50
lines changed

src/ngx_http_lua_headers_out.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ static ngx_http_lua_set_header_t ngx_http_lua_set_handlers[] = {
106106
offsetof(ngx_http_headers_out_t, cache_control),
107107
ngx_http_set_builtin_multi_header },
108108

109+
#if defined(nginx_version) && nginx_version >= 1013009
110+
{ ngx_string("Link"),
111+
offsetof(ngx_http_headers_out_t, link),
112+
ngx_http_set_builtin_multi_header },
113+
#endif
114+
109115
{ ngx_null_string, 0, ngx_http_set_header }
110116
};
111117

0 commit comments

Comments
 (0)