openresty / openresty/headers-more-nginx-module

header_filter_by_lua_block cannot unset header if set by more_set_headers

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.8k
Forks
236
Avg merge
1h 34m
Merged PRs (30d)
2

Description

header_filter_by_lua_block can not unset header if set by more_set_headers

Example:

more_set_headers 'test: test';

header_filter_by_lua_block {
    -- some custom logic to unset previously set header from
    -- upstream or by more_set_headers
    if 1 = 1 then
        ngx.header["test"] = nil
    end
}


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided more_set_headers and header_filter_by_lua_block configuration in an NGINX/OpenResty setup, then trace how the two header filters interact. The issue names no source file or test; done means ngx.header["test"] can unset the header previously set by more_set_headers, with a regression test covering the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.