Compare commits

..

No commits in common. "fe4546e2b548c0dd3033cb8e73c74ee3177a292e" and "61248cc0ca3bcfe0bddf76b0e39b8b505a8698fd" have entirely different histories.

6 changed files with 3 additions and 20 deletions

1
.gitignore vendored
View File

@ -66,7 +66,6 @@ application-dev.yaml
application.properties
application.yaml
application-prod.yaml
application-tencent.yaml
# -----------------------------
# 图片 / 文件上传目录(如有)

View File

@ -10,7 +10,7 @@
</parent>
<groupId>github.benjamin</groupId>
<artifactId>equip-reserve-backend</artifactId>
<version>1.0.3-SNAPSHOT</version>
<version>1.0.2</version>
<name>equip-reserve-backend</name>
<description>equip-reserve-backend</description>
<url/>

View File

@ -7,7 +7,6 @@ import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import java.util.Arrays;
import java.util.List;
@Configuration
@ -19,7 +18,7 @@ public class CorsConfig {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOriginPatterns(Arrays.asList(allowedOrigins.split(",")));
config.setAllowedOriginPatterns(List.of(allowedOrigins));
config.setAllowCredentials(true);
config.addAllowedHeader("*");
config.addAllowedMethod("*");

View File

@ -32,7 +32,6 @@ public class SecurityConfig {
.authorizeHttpRequests(auth -> auth
.requestMatchers("/login").permitAll()
.requestMatchers("/device_image/**").permitAll()
.requestMatchers("/health").permitAll()
.anyRequest().authenticated())
.addFilterBefore(jwtAuthFilter(), UsernamePasswordAuthenticationFilter.class)
.build();

View File

@ -1,14 +0,0 @@
package github.benjamin.equipreservebackend.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HealthController {
@GetMapping("/health")
public String health() {
return "ok";
}
}

View File

@ -16,7 +16,7 @@ jwt:
secret: your-secret
equip-reserve:
device-days: 7
allowed-origins: "http://localhost:5173,http://127.0.0.1:5173"
allowed-origins: http://localhost:5173
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration: