You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signing the contributor's agreement does not grant anyone commit rights to the main
14
-
repository, but it does mean that we can accept your contributions, and you will get an
15
-
author credit if we do. Active contributors might be asked to join the core team, and
16
-
given the ability to merge pull requests.
10
+
## Developer Certificate of Origin (DCO)
11
+
All commits must include a `Signed-off-by` trailer at the end of each commit message
12
+
to indicate that the contributor agrees to the
13
+
[Developer Certificate of Origin](https://developercertificate.org/).
14
+
You can add this automatically by using `git commit -s`.
15
+
16
+
For additional details, please refer to the blog post
17
+
[Hello DCO, Goodbye CLA: Simplifying Contributions to Spring](https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring).
17
18
18
19
## Code of Conduct
19
20
This project adheres to the Contributor Covenant [Code of conduct](https://github.com/spring-cloud/spring-cloud-build/blob/main/docs/modules/ROOT/partials/code-of-conduct.adoc). By participating, you are expected to uphold this code. Please report
20
-
unacceptable behavior to spring-code-of-conduct@pivotal.io.
21
+
unacceptable behavior to code-of-conduct@spring.io.
21
22
22
23
## Code Conventions and Housekeeping
23
24
None of these is essential for a pull request, but they will all help. They can also be
@@ -26,7 +27,7 @@ added after the original pull request but before a merge.
26
27
* Use the Spring Framework code format conventions. If you use Eclipse
27
28
you can import formatter settings using the
28
29
`eclipse-code-formatter.xml` file from the
29
-
[Spring Cloud Build](https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml) project. If using IntelliJ, you can use the
30
+
[Spring Cloud Build](https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-dependencies-parent/eclipse-code-formatter.xml) project. If using IntelliJ, you can use the
30
31
[Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546) to import the same file.
31
32
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
32
33
`@author` tag identifying you, and preferably at least a paragraph on what the class is
@@ -37,7 +38,7 @@ added after the original pull request but before a merge.
37
38
than cosmetic changes).
38
39
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
39
40
* A few unit tests would help a lot as well -- someone has to do it.
40
-
* If no-one else is using your branch, please rebase it against the current master (or
41
+
* If no-one else is using your branch, please rebase it against the current main (or
41
42
other target branch in the main project).
42
43
* When writing a commit message please follow [these conventions](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
43
44
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/cors-configuration.adoc
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,17 +17,19 @@ The following example configures CORS:
17
17
spring:
18
18
cloud:
19
19
gateway:
20
-
globalcors:
21
-
cors-configurations:
22
-
'[/**]':
23
-
allowedOrigins: "https://docs.spring.io"
24
-
allowedMethods:
25
-
- GET
20
+
server:
21
+
webflux:
22
+
globalcors:
23
+
cors-configurations:
24
+
'[/**]':
25
+
allowedOrigins: "https://docs.spring.io"
26
+
allowedMethods:
27
+
- GET
26
28
----
27
29
28
30
In the preceding example, CORS requests are allowed from requests that originate from `docs.spring.io` for all GET requested paths.
29
31
30
-
To provide the same CORS configuration to requests that are not handled by some gateway route predicate, set the `spring.cloud.gateway.globalcors.add-to-simple-url-handler-mapping` property to `true`.
32
+
To provide the same CORS configuration to requests that are not handled by some gateway route predicate, set the `spring.cloud.gateway.server.webflux.globalcors.add-to-simple-url-handler-mapping` property to `true`.
31
33
This is useful when you try to support CORS preflight requests and your route predicate does not evaluate to `true` because the HTTP method is `options`.
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server-webmvc/src/main/java/org/springframework/cloud/gateway/server/mvc/predicate/GatewayRequestPredicates.java
+17-12Lines changed: 17 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -128,20 +128,30 @@ public static RequestPredicate method(HttpMethod... methods) {
128
128
returnRequestPredicates.methods(methods);
129
129
}
130
130
131
+
/**
132
+
* Return a {@code RequestPredicate} that tests the request host against the given
133
+
* host pattern.
134
+
* @param pattern the host pattern to match
135
+
* @return a predicate that tests against the given host pattern
136
+
*/
131
137
publicstaticRequestPredicatehost(Stringpattern) {
132
138
Objects.requireNonNull(pattern, "'pattern' must not be null");
0 commit comments