454 Commits

Author SHA1 Message Date
Spencer Gibb
730822bec0 Move array from stream and use a for loop.
See #1073
2019-06-13 14:29:39 -04:00
buildmaster
8db4855efc Bumping versions to 2.0.5.BUILD-SNAPSHOT after release 2019-06-08 00:40:10 +00:00
buildmaster
6b2b33f66d Going back to snapshots 2019-06-08 00:40:09 +00:00
buildmaster
56a287bacf Update SNAPSHOT to 2.0.4.RELEASE 2019-06-08 00:38:37 +00:00
re6exp
a64a6e3bf5 PR 1014 - moved from master to 2.0.x 2019-06-04 11:27:36 +03:00
Olga Maciaszek-Sharma
1d86bb51f6 Formatting fixes with updated spring java-format plugin. 2019-05-16 18:46:54 +02:00
Olga Maciaszek-Sharma
73bf24a27d Do not pass forward URI scheme along. 2019-05-16 18:45:40 +02:00
Olga Maciaszek-Sharma
80e5e5f3fc Fix checkstyle. Rename test. 2019-04-01 20:17:01 +02:00
Olga Maciaszek-Sharma
063a87cc19 Fix tests after URL cleanup. 2019-04-01 18:52:12 +02:00
Olga Maciaszek-Sharma
53ca3aef2f Merge remote-tracking branch 'spring-operator/polish-urls-remaining-2.0.x' into 2.0.x 2019-04-01 18:37:12 +02:00
Ryan Baxter
1a7df11108 Merge pull request #880 from tony-clarke-amdocs/2.0.x
Update GW metrics filter to include two new tags; the http Method and…
2019-04-01 12:12:25 -04:00
Spring Operator
50020fe390 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://httpbin.org:80 (200) with 12 occurrences could not be migrated:
   ([https](https://httpbin.org:80) result NotSslRecordException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://acme.com:8080 (ConnectTimeoutException) with 1 occurrences migrated to:
  https://acme.com:8080 ([https](https://acme.com:8080) result ConnectTimeoutException).
* [ ] http://acme.org (ConnectTimeoutException) with 2 occurrences migrated to:
  https://acme.org ([https](https://acme.org) result ConnectTimeoutException).
* [ ] http://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to:
  https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException).
* [ ] http://foo.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://foo.example.com ([https](https://foo.example.com) result UnknownHostException).
* [ ] http://www.uri-destination.org (UnknownHostException) with 1 occurrences migrated to:
  https://www.uri-destination.org ([https](https://www.uri-destination.org) result UnknownHostException).
* [ ] http://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html ([https](https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/GatewayFilter.html) result 404).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://acme.com with 1 occurrences migrated to:
  https://acme.com ([https](https://acme.com) result 200).
* [ ] http://cloud.spring.io/spring-cloud-netflix/ with 3 occurrences migrated to:
  https://cloud.spring.io/spring-cloud-netflix/ ([https](https://cloud.spring.io/spring-cloud-netflix/) result 200).
* [ ] http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html ([https](https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html) result 200).
* [ ] http://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html ([https](https://docs.spring.io/spring/docs/5.0.x/javadoc-api/org/springframework/web/server/ServerWebExchange.html) result 200).
* [ ] http://example.com with 8 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://example.org with 34 occurrences migrated to:
  https://example.org ([https](https://example.org) result 200).
* [ ] http://httpbin.org with 1 occurrences migrated to:
  https://httpbin.org ([https](https://httpbin.org) result 200).
* [ ] http://projects.spring.io/spring-cloud/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200).
* [ ] http://projects.spring.io/spring-security/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-security/ ([https](https://projects.spring.io/spring-security/) result 200).
* [ ] http://projects.spring.io/spring-session/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-session/ ([https](https://projects.spring.io/spring-session/) result 200).
* [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 2 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* [ ] http://docs.spring.io with 1 occurrences migrated to:
  https://docs.spring.io ([https](https://docs.spring.io) result 301).
* [ ] http://plugins.jetbrains.com/plugin/6546 with 2 occurrences migrated to:
  https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301).
* [ ] http://eclipse.org with 1 occurrences migrated to:
  https://eclipse.org ([https](https://eclipse.org) result 302).
* [ ] http://eclipse.org/m2e/ with 2 occurrences migrated to:
  https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302).
* [ ] http://www.springsource.com/developer/sts with 1 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://endpoint with 1 occurrences
* http://localhost with 51 occurrences
* http://localhost/ with 2 occurrences
* http://localhost/abc with 1 occurrences
* http://localhost/get with 10 occurrences
* http://localhost/get?a=b with 2 occurrences
* http://localhost/get?a=b&c=d with 4 occurrences
* http://localhost/getb with 3 occurrences
* http://localhost:3001 with 1 occurrences
* http://localhost:8008/configserver/foo/default with 1 occurrences
* http://localhost:8080/flakey with 1 occurrences
* http://localhost:8080/get with 6 occurrences
* http://localhost:9000/foos/ with 4 occurrences
* http://localhost:9080 with 1 occurrences
* http://myhost with 4 occurrences
* http://myhost/abc%20def/get with 1 occurrences
* http://myhost/mypath with 1 occurrences
* http://myservice with 2 occurrences
* http://nameservice with 1 occurrences
* http://nameservice/foo with 1 occurrences
* http://originalhost:8080/foo/bar with 2 occurrences
* http://originalhost:8080/get with 2 occurrences
* http://originalhost:8080/get/ with 1 occurrences
* http://originalhost:8080/one/two/three with 1 occurrences
* http://originalhost:8080/prefix/get with 1 occurrences
* http://originalhost:8080/prefix/get/ with 1 occurrences
* http://override-url with 1 occurrences
* http://override-url:80 with 1 occurrences
* http://routedservice:8090/ with 1 occurrences
* http://routedservice:8090/get with 2 occurrences
* http://routedservice:8090/two with 1 occurrences
* http://service1 with 1 occurrences
* http://someuri with 1 occurrences
* http://someuri:80 with 1 occurrences
* http://someurl with 1 occurrences
2019-03-26 03:38:21 -05:00
Spring Operator
10c8577175 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 222 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 12:50:25 -05:00
Ryan Baxter
3168821a2e Use raw path when passing path to PathContainer.parsePath (#926)
Fixes gh-882
2019-03-20 16:01:55 -04:00
vpavlyuk
0beff09af2 Dedupe response header filter (#866)
Filter that de-duplicates response filter values. Comes handy when e.g. both the gateway CORS logic and a downstream add Access-Control-Allow-Credentials and Access-Control-Allow-Origin headers. See https://github.com/spring-cloud/spring-cloud-gateway/issues/728 for additional context.
2019-03-20 16:00:50 -04:00
Spring Operator
9c00e60ee4 URL Cleanup (#906)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success 
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 8 occurrences migrated to:  
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch with 1 occurrences migrated to:  
  https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200).
* http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin with 1 occurrences migrated to:  
  https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 with 3 occurrences migrated to:  
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.spring.io with 1 occurrences migrated to:  
  https://www.spring.io ([https](https://www.spring.io) result 301).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 16 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 8 occurrences
2019-03-16 11:43:40 -04:00
Tony Clarke
9af4b50a8d Update GW metrics filter to include two new tags; the http Method and the http status (intger value) 2019-03-06 00:25:24 -05:00
Ronny Bräunlich
eb0b10ccc6 Make RedisRateLimiter omit headers if property is set
Fixes #855
2019-02-27 08:15:52 +01:00
Spencer Gibb
9f9454b91f Only tests for management port if it's different than server.port.
fixes gh-854
2019-02-25 13:26:34 -05:00
buildmaster
9d43e083f6 Bumping versions to 2.0.4.BUILD-SNAPSHOT after release 2019-02-22 15:57:17 +00:00
buildmaster
95166db1f8 Going back to snapshots 2019-02-22 15:57:17 +00:00
buildmaster
0492df4443 Update SNAPSHOT to 2.0.3.RELEASE 2019-02-22 15:55:32 +00:00
Spencer Gibb
da8feee32e Disables jmx for test 2019-02-07 20:19:05 -05:00
Spencer Gibb
df3db1bcc4 Throw an error when an 'lb:' scheme is used, but there is no handler.
fixes gh-822
2019-02-06 14:21:06 -05:00
Spencer Gibb
b25e6b15e9 Guards against NPE.
see gh-789
2019-02-05 22:00:55 -05:00
wenqi.huang
38b2168fed ObjectProvider.getIfAvailable() is called too frequently, fix this performance problem. 2019-01-31 14:25:44 -05:00
Spencer Gibb
e960eadb32 WeightCalculatorWebFilter now forces subscription of RouteLocator.
Because it needs to calculate the weights before predicates run, if the
predicates are all defined in yaml, weights aren't initialized until
after the first run, meaning weights are unavailable in the predicates.

WeightCalculatorWebFilter now listens for RoutesRefreshedEvent. When
triggered, it subscribes to RouteLocator, forcing initialization.

fixes gh-332
2019-01-28 15:05:25 -05:00
Tony Clarke
229040a463 Add logging for routes loaded by gatewy properties 2019-01-18 14:23:09 -05:00
Ryan Baxter
09eacaadcf Merge pull request #781 from young891221/handlerStrategies-performance-fix
create HandlerStrategies only one in ModifyRequestBodyGatewayFilterFactory.  Fixes #760
2019-01-17 11:13:27 -05:00
Ryan Baxter
242fc34305 Validate that we actually have a hostname when using a load balanced URI. Fixes #779 2019-01-17 11:09:43 -05:00
young891221
eba10481b5 code refactoring 2019-01-17 13:56:37 +09:00
emilnkrastev
dfc52c7ad1 Fix trailing slash in strip prefix filter (#770)
The existing Strip Prefix filter removes the trailing slash, which causes incoming requests to fail upon hitting the downstream service.
2019-01-16 18:27:27 -05:00
artemMartynenko
6d2929a289 refactor null safety http method resolving for non standard method (#741)
* refactor null safety http method resolving for non standard method
2019-01-16 16:53:54 -05:00
young891221
ad1dc247dc create HandlerStrategies only one 2019-01-16 16:39:02 +09:00
Spencer Gibb
78e82c4ea6 Run http headers filters for response after status code is set.
This makes the status code available to the filters.

fixes gh-757
2019-01-08 10:44:51 -05:00
Ryan Baxter
3b41ee5b7a Merge pull request #722 from ryanjbaxter/use-scheme-from-loadbalancer
Allow isSecure property of LoadBalancer ServiceInstance to determine the scheme of the URL
2019-01-07 16:13:31 -05:00
Spencer Gibb
b4a9bff655 Disables TimeoutException.fillInStackTrace() 2018-12-21 11:33:03 -05:00
Ryan Baxter
077b647ec4 Allow isSecure property of LoadBalancer ServiceInstance to determine the scheme of the URL. Fixes #641 2018-12-18 15:51:19 -05:00
Spencer Gibb
f06edbaf19 Restores ability to just check for the presence of a header.
fixes gh-715
2018-12-12 18:24:19 -05:00
Spencer Gibb
0da60bbeae Extracts variables from Host Route Predicate.
fixes gh-706
2018-12-10 23:00:34 -05:00
Spencer Gibb
8194137f03 Fixes constant documentation reference for Path Route Predicate.
Also aligns to a new constant name.

fixes gh-708
2018-12-10 22:19:07 -05:00
Spencer Gibb
4a987fd6a4 Cleans up return statement. 2018-12-10 22:16:23 -05:00
Spencer Gibb
21f165c313 Adds convenience methods for working with Path Predicate variables.
fixes gh-705
2018-12-10 21:26:29 -05:00
Spencer Gibb
8dff219cf2 fixes bad default 2018-12-10 16:14:53 -05:00
Spencer Gibb
d7669b7415 Fixes inconsistencies in request rate limiter filter.
Allows other `KeyResolver` implementations to be injected.

If key resolver does not resolve a key, requests can be conditionally
denied.

fixes gh-624
2018-12-10 15:45:20 -05:00
Spencer Gibb
8abac4b0ba Uses default port and ignores errors if redis running 2018-12-10 14:10:27 -05:00
Spencer Gibb
e3799c4820 Don't fail redis rule if redis is already running. 2018-12-10 14:10:05 -05:00
Ryan Baxter
2bbdda9e6a Add x-forwarded-for-prefix when request matches origin. Fixes #619 2018-11-07 19:55:31 -05:00
Ryan Baxter
2879296c8b Merge pull request #611 from mmanciop/embedded-redis
Use EmbeddedRedis to make build self-contained
2018-10-24 19:33:47 -04:00
Vitaliy Pavlyuk
7d3689fa9e Merge remote-tracking branch 'upstream/2.0.x' into rewrite_response_header_filter 2018-10-23 15:46:59 -04:00