0

So what I want to do is have different application properties for each http request that is sent to my application. I know that having profiles allows me to set up different property values for the same property. However this is only beneficial for if testing the application and switching the active profile each time. As if you have both profiles active at the same time if there is a conflicting property then one overrides the other.

In the main property that I want to include for each http request is the http header size so that I can limit the size of the header from each request. However at current I can only set this value once and have it consistent throughout the whole application.

Tom
  • 1
  • You are using a chainsaw to cut butter. Both, [@GetMapping](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/GetMapping.html) and [@PostMapping](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/PostMapping.html) have an option to filter headers. You can also ["access the headers as parameters"](https://stackoverflow.com/questions/19556039/how-to-get-access-to-http-header-information-in-spring-mvc-rest-controller), so to speak. – Jetto Martínez Jul 18 '22 at 15:38
  • @JettoMartínez So would you recommend handling the issue in the actual method where the request is being sent? – Tom Jul 18 '22 at 16:01
  • Given how granular you need to control headers, I'd look into that first. If it doesn't fit what you need or how you need to implement it, it would be pretty useful to add the reasons why it doesn't help you to the question, to better try to help. – Jetto Martínez Jul 18 '22 at 16:40

0 Answers0