Instead of blocking them (which is the default behaviour of a
Spring MVC controller) Cors requests will flow through the Zuul
filters by default. Users can control it by grabbing the
ZuulHandlerMapping in a @PostConstruct and injecting some
CorsConfiguration via its setCorsConfigurations() method.
This fixes most of the issues people encounter when there are
multiple proxies in the request. The tricky thing is that there
is another header "Forwarded" that we don't recognize, but which
backends probably do, at least some of the time (since it is
from an actual RFC). The problem is that "Forwarded" does not
contain the ports, so Spring UriComponentsBuilder cannot use it
to rewrite links to a specific port. Since we do not support it
already, this change doesn't make things any worse, but the
corner case is there still.
The SimpleHostRoutingFilter now accepts normal -Dhttps.proxy= and
-Dhttps.port= settings (and other things that generally work with
java.net).
Fixes gh-510
A problem in Spring Boot means that the extra conditions are combined
with OR not AND, so it's a bug to have more than one until that
gets fixed (in an AnyNestedCondition).
See https://github.com/spring-projects/spring-boot/pull/6672
It isn't very helpful to have a Collection converted to a String
anyway. We need to implement something new in Feign to apply
the converter (expander) to individual elements in the collection
but this change should get back to the old behaviour with
List<String> at least.
Fixes gh-1115
The Angel client has an idiosyncratic way of calculating an instance
id, and the Brixton client aligned with that already, but the
Brixton server did not. This change should make Brixton Eureka
Servers work with Angel clients.
See gh-978
The way it was being used internally means that we didn't need the
annotation anyway. It would be nice to have it back if the Spring
issue gets resolved, because then we could actually use it as
intended.
Fixes gh-1025
Before this change we were seeing test failures in
spring-cloud-netflix-eureka-server (but only with Spring Boot 1.4)
caused by annotation processing explosion when
RefreshScopeAutoConfiguration is not on the classpath.
Adds an `@ExportMetricReader` which was missing before and
led to people losing their metric exports when they had Servo
on the classpath.
Also allow servo metrics autoconfiguration to be disabled via
a flag netflix.metrics.servo.enabled=false (as an alternative to
excluding the class in `@EnableAutoConfiguration`).
The zone for a remote server comes from its
eureka.instance.metadataMap.zone, but we didn't (until this change)
apply the same logic to the client. If the client is registering
itslef with eureka then it will have a metadataMap itself and
we should be able to just reverse the logic.
Fixes gh-991
By default we now discard all Set-Cookie and Cookie headers. User
can manipulate it per route via zuul.routes.*.sensitiveHeaders, or
globally via zuul.ignoredHeaders.
Latest Eureka from Netflix uses a different HTTP client, and it
ignores the HTTP basic credentials in a service URL. This change
partially restores the old behaviour by providing an interceptor
(ClientFilter) that has a single, global username/password
taken from the first serviceUrl that contains credentials.
Fixes gh-849
Any client that wants to can include it back again, but generally
it only causes problems (XML returned from apps instead of
JSON by Spring MVC for instance). In general it only causes problems
for services whose clients use "Accept: application/xml,*/*", for
instance (like a browser).
See gh-306
Eureka now has the option (maybe always there) to not register
and that's a sensible default in the bootstrap phase (when we
might not know the port yet).
This reverts commit 3f34ccc8fb. We
need to discuss a bit more (that thread local is probably unavoidable
given the design of Feign, but I don't like it yet).
See gh-841