-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
simon Kitching opened SPR-16262 and commented
I am running a spring-boot app within Google AppEngine behind an IAP proxy which terminates https connections. The proxy sets X-Forwarded-Proto=https on requests, but does not set X-Forwarded-Port. The result is that the spring-web CORS filter rejects requests with "not same origin" even though the origin actually is the same.
This is made worse by the fact that the Chrome browser sends the "origin" header on many different request types, including all POST requests and all resources referenced from a css-file (eg fonts) - ie on requests which are NOT cross-origin.
While it may be argued that Google should add a header, this is a problem that may hit many users. It is also really really nasty to actually figure out the real cause of the problem..
Affects: 4.3.12
Issue Links:
- UriComponentsBuilder#fromHttpRequest should consider RFC-7239 Forwarded headers [SPR-11856] #16475 UriComponentsBuilder#fromHttpRequest should consider RFC-7239 Forwarded headers
- UriComponentsBuilder's fromHttpRequest uses server port as host port when handling the Forwarded header [SPR-15504] #20063 UriComponentsBuilder's fromHttpRequest uses server port as host port when handling the Forwarded header
- Check scheme in WebUtils#isSameOrigin [SPR-16362] #20909 Check scheme in WebUtils#isSameOrigin
Referenced from: commits 9c7de23, c326e44, 1b3b058
Backported to: 4.3.14