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 2323import org .springframework .security .crypto .password .PasswordEncoder ;
2424import org .springframework .security .web .SecurityFilterChain ;
2525import org .springframework .security .web .header .writers .XXssProtectionHeaderWriter .HeaderValue ;
26- import org .springframework .security .web .util .matcher .AntPathRequestMatcher ;
2726
2827@ Configuration
2928@ EnableWebSecurity
@@ -41,10 +40,10 @@ public SecurityConfig(JwtTokenService jwtTokenService) {
4140 public SecurityFilterChain configure (HttpSecurity http ) throws Exception {
4241// JwtTokenFilter customFilter = new JwtTokenFilter(jwtTokenService);
4342 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 ())
4847 .csrf (myCsrf -> myCsrf .disable ())
4948 .sessionManagement (mySm -> mySm .sessionCreationPolicy (SessionCreationPolicy .STATELESS ))
5049 .headers (myHeaders -> myHeaders .xssProtection (myXss -> myXss .headerValue (HeaderValue .ENABLED )))
Original file line number Diff line number Diff line change 5252@ Transactional
5353public class ImageService {
5454 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 ;
5858 @ Value ("${image.result-size:20}" )
5959 private Long resultSize ;
6060 //private final String systemPrompt = "You are a helpful assistent searching image descriptions.";
You can’t perform that action at this time.
0 commit comments