0

In Spring Boot the X-Application-Context header is set by the ApplicationContextHeaderFilter.class.

My question: What is the reason for this header? Is it used internally? Can it be changed without any sideeffect/impact?

The documentation I found is unclear.

Update 1

Base on: Stack Overflow: what is x-Application-Context header?

Update 2

For me the internal usage is still unclear and I will use a custom header instead. But I am still interested in the internal usage.

halfer
  • 19,824
  • 17
  • 99
  • 186
eventhorizon
  • 2,977
  • 8
  • 33
  • 57

1 Answers1

2

X-Application-Context It is a name for the deployed application that this context belongs to. Context in this case a Spring ApplicationContext.

The header itself can be used for debugging purpose. But it also can repsent a possible server port leaking risk. In production it is usually behind some security proxy and it doen't get exposed.

The header exposure can be stopped by setting management.add-application-context-header: false.

Anton N
  • 2,317
  • 24
  • 28