Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow configuring shouldLogRequestHeader/shouldLogResponseHeader

Open
#1,344 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java, spring
Domain
api, backend

Research direction

Start by tracing the existing shouldLogRequestHeader and shouldLogResponseHeader methods and the Spring Cloud OpenFeign client configuration entry points. Add the four request and response include/exclude properties, then verify that excluded headers are omitted and that an include list limits logged headers when present.

Written by the indexing model from the issue text.

Description

waiting-for-triage

**Suppressing specific headers is cumbersome **
Certain headers should probably not be logged, e.g., Authorization.

Add configuration properties to include/exclude headers
Add the following list configurations:

  • spring.cloud.openfeign.client.config.name.headers.request.include
  • spring.cloud.openfeign.client.config.name.headers.request.exclude
  • spring.cloud.openfeign.client.config.name.headers.response.include
  • spring.cloud.openfeign.client.config.name.headers.response.exclude

The expected behavior would be to exclude any header in the exclude list, and only show header in the include list if any are present.

Alternatives: Making a custom component

@Component
    class MyFeignLoggerFactory implements FeignLoggerFactory {
      @Override
      public Logger create(Class<?> type) {
        return new Slf4jLogger(type) {
          @Override
          protected boolean shouldLogRequestHeader(String header) {
            return !"Authorization".equals(header);
          }
        };
      }
    }
Dominant language
Java
Stars
1.3k
Forks
836
Avg merge
1d 1h
Merged PRs (30d)
25

Getting set up

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.

More from spring-cloud/spring-cloud-openfeign

All issues in spring-cloud/spring-cloud-openfeign

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.