File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
backend/src/main/java/ch/xxx/aidoclibchat Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 23
23
import org .springframework .security .crypto .password .PasswordEncoder ;
24
24
import org .springframework .security .web .SecurityFilterChain ;
25
25
import org .springframework .security .web .header .writers .XXssProtectionHeaderWriter .HeaderValue ;
26
- import org .springframework .security .web .util .matcher .AntPathRequestMatcher ;
27
26
28
27
@ Configuration
29
28
@ EnableWebSecurity
@@ -41,10 +40,10 @@ public SecurityConfig(JwtTokenService jwtTokenService) {
41
40
public SecurityFilterChain configure (HttpSecurity http ) throws Exception {
42
41
// JwtTokenFilter customFilter = new JwtTokenFilter(jwtTokenService);
43
42
HttpSecurity httpSecurity = http
44
- .authorizeHttpRequests (authorize -> authorize .requestMatchers (AntPathRequestMatcher . antMatcher ( "/rest/auth/**" ) ).permitAll ()
45
- // .requestMatchers(AntPathRequestMatcher.antMatcher( "/rest/**") ).authenticated()
46
- .requestMatchers (AntPathRequestMatcher . antMatcher ( "/rest/**" ) ).permitAll ()
47
- .requestMatchers (AntPathRequestMatcher . antMatcher ( "/**" ) ).permitAll ())
43
+ .authorizeHttpRequests (authorize -> authorize .requestMatchers ("/rest/auth/**" ).permitAll ()
44
+ // .requestMatchers("/rest/**").authenticated()
45
+ .requestMatchers ("/rest/**" ).permitAll ()
46
+ .requestMatchers ("/**" ).permitAll ())
48
47
.csrf (myCsrf -> myCsrf .disable ())
49
48
.sessionManagement (mySm -> mySm .sessionCreationPolicy (SessionCreationPolicy .STATELESS ))
50
49
.headers (myHeaders -> myHeaders .xssProtection (myXss -> myXss .headerValue (HeaderValue .ENABLED )))
Original file line number Diff line number Diff line change 52
52
@ Transactional
53
53
public class ImageService {
54
54
private static final Logger LOG = LoggerFactory .getLogger (ImageService .class );
55
- private ChatClient chatClient ;
56
- private ImageRepository imageRepository ;
57
- private DocumentVsRepository documentVsRepository ;
55
+ private final ChatClient chatClient ;
56
+ private final ImageRepository imageRepository ;
57
+ private final DocumentVsRepository documentVsRepository ;
58
58
@ Value ("${image.result-size:20}" )
59
59
private Long resultSize ;
60
60
//private final String systemPrompt = "You are a helpful assistent searching image descriptions.";
You can’t perform that action at this time.
0 commit comments