Skip to content

Commit 86180e9

Browse files
committed
some comments
1 parent b785f36 commit 86180e9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/de/doubleslash/example/springboot/MySecurityConfigurer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ public static class BasicAuthAdminForDevFunctionality extends WebSecurityConfigu
3939
protected void configure(final HttpSecurity http) throws Exception {
4040
http.antMatcher("/h2-console/**").authorizeRequests().anyRequest().permitAll();
4141

42+
// CSRF Prüfung für H2 Konsole deaktivieren, ok, da wir diese nur während der Entwicklung brauchen...
43+
// Ansonsten: There was an unexpected error (type=Forbidden, status=403).
44+
// Expected CSRF token not found. Has your session expired?
4245
http.csrf().disable();
46+
// ebenso Frame Options...
4347
http.headers().frameOptions().disable();
44-
// There was an unexpected error (type=Forbidden, status=403).
45-
// Expected CSRF token not found. Has your session expired?
48+
4649
}
4750

4851
}

src/main/java/de/doubleslash/example/springboot/UserInit.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class UserInit implements CommandLineRunner {
1515
public void run(final String... args) throws Exception {
1616
final User user1 = new User("user1",
1717
// Passwort hashen
18-
new BCryptPasswordEncoder().encode("bootifulPassword"), true, new Role("USER"));
18+
new BCryptPasswordEncoder().encode("bootifulPassword"), //
19+
true, new Role("USER"));
1920
userRepo.save(user1);
2021
}
2122

0 commit comments

Comments
 (0)