openresty / openresty/headers-more-nginx-module

set_header and clear_header do not work on the first request.

Open
#36 1 comment 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

Hello, I am looking for solution to solve the following issues.

Issue

Headers (Sever, X-Page-Speed, X-Upstream) are not removed in the first line
but removed in the subsequent requests

details

my ngnix.conf has the following:

http {
        more_set_headers 'Server: ocapp';
        more_clear_headers 'X-Page-Speed';
        more_clear_headers 'X-Upstream';

The configuration does not work on the first request. https://qa3.x.com. Header information is not changed by the header-more commands.

But the command works on the subsequent requests.

image

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

No source file or test is named. Start by reproducing the behavior with the provided nginx.conf and compare the first response with subsequent requests, focusing on the set_header and clear_header directives. Done means Server, X-Page-Speed, and X-Upstream are handled correctly on the first request as well as later requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.