Browse Source

Merge pull request #977 from spring-operator/polish-urls-remaining-rate-limiter-no-lua

URL Cleanup
rate-limiter-no-lua
Ryan Baxter 6 years ago committed by GitHub
parent
commit
6a13f23a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      README.adoc
  2. 16
      docs/src/main/asciidoc/spring-cloud-gateway.adoc
  3. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/predicate/RemoteAddrRoutePredicateFactory.java
  4. 2
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RedirectToWebFilterFactoryTests.java
  5. 2
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/handler/predicate/BetweenRoutePredicateFactoryTests.java
  6. 2
      spring-cloud-gateway-core/src/test/resources/application.yml

16
README.adoc

@ -83,7 +83,7 @@ credentials and you already have those. @@ -83,7 +83,7 @@ credentials and you already have those.
The projects that require middleware generally include a
`docker-compose.yml`, so consider using
http://compose.docker.io/[Docker Compose] to run the middeware servers
https://compose.docker.io/[Docker Compose] to run the middeware servers
in Docker containers. See the README in the
https://github.com/spring-cloud-samples/scripts[scripts demo
repository] for specific instructions about the common cases of mongo,
@ -105,13 +105,13 @@ a modified file in the correct place. Just commit it and push the change. @@ -105,13 +105,13 @@ a modified file in the correct place. Just commit it and push the change.
=== Working with the code
If you don't have an IDE preference we would recommend that you use
http://www.springsource.com/developer/sts[Spring Tools Suite] or
http://eclipse.org[Eclipse] when working with the code. We use the
http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
https://www.springsource.com/developer/sts[Spring Tools Suite] or
https://eclipse.org[Eclipse] when working with the code. We use the
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
should also work without issue as long as they use Maven 3.3.3 or better.
==== Importing into eclipse with m2eclipse
We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
marketplace".
@ -140,7 +140,7 @@ from the `file` menu. @@ -140,7 +140,7 @@ from the `file` menu.
==== Adding Project Lombok Agent
Spring Cloud uses http://projectlombok.org/features/index.html[Project Lombok]
Spring Cloud uses https://projectlombok.org/features/index.html[Project Lombok]
to generate getters and setters etc. Compiling from the command line this
shouldn't cause any problems, but in an IDE you need to add an agent
to the JVM. Full instructions can be found in the Lombok website. The
@ -202,7 +202,7 @@ added after the original pull request but before a merge. @@ -202,7 +202,7 @@ added after the original pull request but before a merge.
`eclipse-code-formatter.xml` file from the
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
Cloud Build] project. If using IntelliJ, you can use the
http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
Plugin] to import the same file.
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
`@author` tag identifying you, and preferably at least a paragraph on what the class is
@ -215,6 +215,6 @@ added after the original pull request but before a merge. @@ -215,6 +215,6 @@ added after the original pull request but before a merge.
* A few unit tests would help a lot as well -- someone has to do it.
* If no-one else is using your branch, please rebase it against the current master (or
other target branch in the main project).
* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
message (where XXXX is the issue number).

16
docs/src/main/asciidoc/spring-cloud-gateway.adoc

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
:github-tag: master
:github-repo: spring-cloud-incubator/spring-cloud-gateway
:github-raw: http://raw.github.com/{github-repo}/{github-tag}
:github-code: http://github.com/{github-repo}/tree/{github-tag}
:github-raw: https://raw.github.com/{github-repo}/{github-tag}
:github-code: https://github.com/{github-repo}/tree/{github-tag}
:all: {asterisk}{asterisk}
:nofooter:
:imagesdir: ./images
@ -15,7 +15,7 @@ include::intro.adoc[] @@ -15,7 +15,7 @@ include::intro.adoc[]
== How to Include Spring Cloud Gateway
To include Spring Cloud Gateway in your project use the starter with group `org.springframework.cloud`
and artifact id `spring-cloud-starter-gateway`. See the http://projects.spring.io/spring-cloud/[Spring Cloud Project page]
and artifact id `spring-cloud-starter-gateway`. See the https://projects.spring.io/spring-cloud/[Spring Cloud Project page]
for details on setting up your build system with the current Spring Cloud Release Train.
Include the `@EnableGateway` annotation on any `@Configuration` class to enable Spring Cloud Gateway.
@ -55,7 +55,7 @@ spring: @@ -55,7 +55,7 @@ spring:
routes:
# =====================================
- id: cookie_route
uri: http://example.org
uri: https://example.org
predicates:
- Cookie=chocolate, ch.p
----
@ -74,7 +74,7 @@ spring: @@ -74,7 +74,7 @@ spring:
routes:
# =====================================
- id: header_route
uri: http://example.org
uri: https://example.org
predicates:
- Header=X-Request-Id, \d+
----
@ -93,7 +93,7 @@ spring: @@ -93,7 +93,7 @@ spring:
routes:
# =====================================
- id: host_route
uri: http://example.org
uri: https://example.org
predicates:
- Host=**.somehost.org
----
@ -113,7 +113,7 @@ spring: @@ -113,7 +113,7 @@ spring:
routes:
# =====================================
- id: method_route
uri: http://example.org
uri: https://example.org
predicates:
- Method=GET
----
@ -132,7 +132,7 @@ spring: @@ -132,7 +132,7 @@ spring:
routes:
# =====================================
- id: host_route
uri: http://example.org
uri: https://example.org
predicates:
- Path=/foo/{segment}
----

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/predicate/RemoteAddrRoutePredicateFactory.java

@ -74,7 +74,7 @@ public class RemoteAddrRoutePredicateFactory implements RoutePredicateFactory { @@ -74,7 +74,7 @@ public class RemoteAddrRoutePredicateFactory implements RoutePredicateFactory {
source = source + "/32";
}
if (source.endsWith("/32")) {
//http://stackoverflow.com/questions/2942299/converting-cidr-address-to-subnet-mask-and-network-address#answer-6858429
//https://stackoverflow.com/questions/2942299/converting-cidr-address-to-subnet-mask-and-network-address#answer-6858429
inclusiveHostCount = true;
}
//TODO: howto support ipv6 as well?

2
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RedirectToWebFilterFactoryTests.java

@ -55,7 +55,7 @@ public class RedirectToWebFilterFactoryTests extends BaseWebClientTests { @@ -55,7 +55,7 @@ public class RedirectToWebFilterFactoryTests extends BaseWebClientTests {
assertStatus(response, HttpStatus.FOUND);
HttpHeaders httpHeaders = response.headers().asHttpHeaders();
assertThat(httpHeaders.getFirst(HttpHeaders.LOCATION))
.isEqualTo("http://example.org");
.isEqualTo("https://example.org");
})
.expectComplete()
.verify(DURATION);

2
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/handler/predicate/BetweenRoutePredicateFactoryTests.java

@ -119,7 +119,7 @@ public class BetweenRoutePredicateFactoryTests { @@ -119,7 +119,7 @@ public class BetweenRoutePredicateFactoryTests {
}
static ServerWebExchange getExchange() {
MockServerHttpRequest request = MockServerHttpRequest.get("http://example.com").build();
MockServerHttpRequest request = MockServerHttpRequest.get("https://example.com").build();
return new MockServerWebExchange(request);
}
}

2
spring-cloud-gateway-core/src/test/resources/application.yml

@ -93,7 +93,7 @@ spring: @@ -93,7 +93,7 @@ spring:
predicates:
- Host=**.redirectto.org
filters:
- RedirectTo=302, http://example.org
- RedirectTo=302, https://example.org
# =====================================
- id: remove_request_header_test

Loading…
Cancel
Save