Skip to content

Commit 2b9b148

Browse files
committed
Remove code snippet
1 parent 1573e32 commit 2b9b148

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/sql.adoc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,9 @@ H2 Console uses frames and, as it's intended for development only, does not impl
331331

332332
More information on {spring-security-docs}#csrf[CSRF] and the header {spring-security-docs}#headers-frame-options[X-Frame-Options] can be found in the Spring Security Reference Guide.
333333

334-
In simple setups, a `SecurityFilterChain` like the following can be used:
334+
WARNING: The H2 console is only intended for use during development. For production websites, disabling CSRF protection or allowing frames may create severe security risks.
335335

336-
[source,java,indent=0,subs="verbatim"]
337-
----
338-
include::{docs-java}/features/sql/h2webconsole/springsecurity/DevProfileSecurityConfiguration.java[]
339-
----
340-
341-
WARNING: The H2 console is only intended for use during development. In production, disabling CSRF protection or allowing frames for a website may create severe security risks.
342-
343-
TIP: `PathRequest.toH2Console()` returns the correct request matcher also when the console's path has been customized.
336+
TIP: `PathRequest.toH2Console()` provides a `RequestMatcher` for the console that is useful when configuring Spring Security or implementing a custom servlet filter.
344337

345338

346339

spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/sql/h2webconsole/springsecurity/DevProfileSecurityConfiguration.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)