This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new a33131d39 try to fix scala/java issue with CORS page (#385)
a33131d39 is described below
commit a33131d3949720bee08f36d9cce466216eb59c3c
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Dec 28 08:42:45 2023 +0100
try to fix scala/java issue with CORS page (#385)
---
docs/src/main/paradox/common/cors.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/src/main/paradox/common/cors.md
b/docs/src/main/paradox/common/cors.md
index 8cde1e3dd..44f610f6c 100644
--- a/docs/src/main/paradox/common/cors.md
+++ b/docs/src/main/paradox/common/cors.md
@@ -28,6 +28,7 @@ val route: Route = cors() {
}
```
@@@
+
@@@ div { .group-java }
```java
import static org.apache.pekko.http.cors.javadsl.CorsDirectives.*;
@@ -39,6 +40,7 @@ final Route route = cors(() -> {
@@@
The settings can be updated programmatically too.
+
@@@ div { .group-scala }
```scala
val settings = CorsSettings(...).withAllowGenericHttpRequests(false)
@@ -47,6 +49,7 @@ val strictRoute: Route = cors(settings) {
}
```
@@@
+
@@@ div { .group-java }
```java
final CorsSettings settings =
CorsSettings.create(...).withAllowGenericHttpRequests(false);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]