1. 02 Oct, 2015 7 commits
    • Phillip Webb's avatar
      Document X-Forwarded-For support · d4c2959c
      Phillip Webb authored
      Closes gh-4018
      d4c2959c
    • Phillip Webb's avatar
      Automatically X-Forwarded-For in the cloud · 33ce1602
      Phillip Webb authored
      Update `ServerProperties` to automatically enable `use-forward-headers`
      when running on a cloud platform.
      
      A new `CloudPlatform` enum has been introduced that detects Heroku and
      Cloud Foundry.
      
      See gh-4018
      33ce1602
    • Phillip Webb's avatar
      Unify ServerProperties X-Forwarded-For support · 20b29db5
      Phillip Webb authored
      Add a new `server.use-forward-headers` property which can be used to
      switch on X-Forwarded-For header support in all supported embedded
      servlet containers.
      
      This commit reverts the decision to enable `RemoteIpValve` with Tomcat
      by default (gh-3782) and requires that either `user-forward-headers` is
      set to true or that `server.tomcat.protocol-header` or
      `server.tomcat.remote-ip-header` are set.
      
      See gh-4018
      See gh-3782
      20b29db5
    • Phillip Webb's avatar
      Add X-Forwarded-For header support to Undertow · c35105b8
      Phillip Webb authored
      Add a `useForwardHeaders` property to allow embedded Undertow
      containers to respect X-Forwarded-For headers.
      
      Fixes gh-3881
      c35105b8
    • Phillip Webb's avatar
      Add X-Forwarded-For header support to Jetty · 7f976819
      Phillip Webb authored
      Add a `useForwardHeaders` property to allow embedded Jetty containers
      to respect X-Forwarded-For headers.
      
      Fixes gh-3802
      7f976819
    • Phillip Webb's avatar
      Add Tomcat X-Forwarded-For header tests · 50430a20
      Phillip Webb authored
      Update Abstract & Tomcat EmbeddedServletContainerFactoryTests to check
      that X-Forwarded-For headers work as expected.
      
      See gh-4018
      50430a20
    • Phillip Webb's avatar
      Fix management security when using different port · 5cbb81c6
      Phillip Webb authored
      Update ManagementWebSecurityAutoConfiguration to reinstate lazy creation
      of EndpointHandlerMapping from the EndpointPathRequestMatcher.
      
      Fixes a regression introduced in eb298478 and picked up my one of the
      sample integration tests.
      
      Fixes gh-4059
      5cbb81c6
  2. 01 Oct, 2015 12 commits
  3. 30 Sep, 2015 16 commits
  4. 29 Sep, 2015 5 commits
    • Phillip Webb's avatar
      Merge branch '1.2.x' · 9681df0e
      Phillip Webb authored
      9681df0e
    • Phillip Webb's avatar
      Polish · 69d57f9a
      Phillip Webb authored
      69d57f9a
    • Phillip Webb's avatar
      Support `.` and `_` binder prefix joins · b0d9a832
      Phillip Webb authored
      Update RelaxedDataBinder so that both `.` and `_` are considered in
      getPropertyValuesForNamePrefix(...).
      
      With Spring Boot 1.2.5 binding environment variables of the form
      `FOO_BAR_BAZ` to `@ConfigurationProperties(prefix="foo-bar")` objects
      worked thanks to a happy accident. When `PropertySourcesPropertyValues`
      processed a non enumerable `PropertySource` it called the resolver
      with a property name `FOO_BAR.BAZ`. A `SystemEnvironmentPropertySource`
      will replace `.` with `_` and hence find a value.
      
      Commit 1abd0879 updated non enumerable processing such that the resolver
      was never called.
      
      Replicating the problem is quite involved as you need to ensure that you
      have both a SystemEnvironmentPropertySource and a non-enumerable
      property source (e.g. RandomPropertySource). A test has been added to
      PropertiesConfigurationFactoryTests which passes on 1.2.5, fails on
      1.2.6 and passes again following this commit.
      
      Fixes gh-4045
      b0d9a832
    • Andy Wilkinson's avatar
      Update tests to close the application contexts that they create · e9878ebb
      Andy Wilkinson authored
      This commit updates a number of tests in spring-boot to ensure that
      they close the application contexts that they create. SimpleMainTests
      still create a number of contexts that are not closed as there’s no
      (easy) way to get hold of the context when testing the main method.
      
      See gh-4053
      e9878ebb
    • Andy Wilkinson's avatar
      1bc1785d