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
Copy file name to clipboardExpand all lines: graphql-spring-boot-starter/src/main/java/org/springframework/graphql/boot/GraphQlWebFluxAutoConfiguration.java
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -155,20 +155,20 @@ public HandlerMapping graphQlWebSocketEndpoint(GraphQlWebSocketHandler graphQlWe
Copy file name to clipboardExpand all lines: graphql-spring-boot-starter/src/main/java/org/springframework/graphql/boot/GraphQlWebMvcAutoConfiguration.java
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -176,20 +176,20 @@ public HandlerMapping graphQlWebSocketMapping(GraphQlWebSocketHandler handler, G
Spring web frameworks all support CORS (Cross-Origin Resource Sharing), which is a critical part
239
-
of your web configuration if your GraphQL API is meant to be accessed by browsers using different domains.
240
-
241
-
You can configure CORS support with properties:
242
-
243
-
[source,properties,indent=0,subs="verbatim"]
244
-
----
245
-
spring.graphql.cors.allowed-origins=https://example.org # Comma-separated list of origins to allow. '*' allows all origins.
246
-
spring.graphql.cors.allowed-origin-patterns= # Comma-separated list of origin patterns like 'https://*.example.com' to allow.
247
-
spring.graphql.cors.allowed-methods=GET,POST # Comma-separated list of methods to allow. '*' allows all methods.
248
-
spring.graphql.cors.allowed-headers= # Comma-separated list of headers to allow in a request. '*' allows all headers.
249
-
spring.graphql.cors.exposed-headers= # Comma-separated list of headers to include in a response.
250
-
spring.graphql.cors.allow-credentials= # Whether credentials are supported. When not set, credentials are not supported.
251
-
spring.graphql.cors.max-age=1800s # How long the response from a pre-flight request can be cached by clients.
252
-
----
253
-
254
-
TIP: For more information about the properties and their meaning, check out the {javadoc}/org/springframework/graphql/boot/GraphQlCorsProperties.html[GraphQlCorsProperties Javadoc].
255
-
256
-
You can also learn more about CORS and Spring support in {spring-framework-ref-docs}/web.html#mvc-cors[Spring MVC] and
0 commit comments