Skip to content

Commit 6bf63ad

Browse files
authored
Merge pull request #37 from Leets-Official/30-fearture-domain
feat: 도메인 연결
2 parents 9b9fcb0 + c090a91 commit 6bf63ad

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/main/java/com/leets/commitatobe/global/config/SecurityConfig.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.leets.commitatobe.global.filter.JwtAuthenticationFilter;
44
import com.leets.commitatobe.global.utils.JwtProvider;
55
import lombok.RequiredArgsConstructor;
6-
import org.springframework.beans.factory.annotation.Value;
76
import org.springframework.context.annotation.Bean;
87
import org.springframework.context.annotation.Configuration;
98
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -24,8 +23,6 @@
2423
@EnableWebSecurity
2524
@RequiredArgsConstructor
2625
public class SecurityConfig {
27-
@Value("${domain.uri}")
28-
private String DOMAIN_URI;
2926
private final JwtProvider jwtProvider;
3027

3128
@Bean
@@ -63,9 +60,12 @@ CorsConfigurationSource corsConfigurationSource() {
6360
"http://localhost:8080",
6461
"http://localhost:3000",
6562
"http://localhost:5173",
63+
"http://localhost:5174",
64+
"https://api.commitato.com",
65+
"https://commitato.com",
66+
"https://www.commitato.com",
6667
"https://api.github.com",
67-
"https://github.com",
68-
DOMAIN_URI));
68+
"https://github.com"));
6969
configuration.setAllowedMethods(Arrays.asList("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
7070
configuration.setAllowCredentials(true);
7171
configuration.setAllowedHeaders(List.of("*"));

src/main/java/com/leets/commitatobe/global/config/swagger/SwaggerConfig.java

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public OpenAPI openApi() {
2828
.bearerFormat("JWT")
2929
);
3030

31+
Server apiServer = new Server();
32+
apiServer.setUrl("https://api.commitato.site");
33+
34+
Server server = new Server();
35+
server.setUrl("/");
36+
3137
return new OpenAPI()
3238
.addServersItem(new Server().url("/"))
3339
.addSecurityItem(securityRequirement)

src/main/resources/application-dev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jwt:
3535
aes-secret: ${AES_SECRET}
3636
iv-secret: ${IV_SECRET}
3737

38-
domain-uri: ${DOMAIN_URI}
38+
domain-uri: "https://api.commitato.com"

src/main/resources/application-local.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ spring:
22
datasource:
33
url: jdbc:mysql://localhost:3306/commitato
44
username: root
5-
password: 1220
5+
password:
66
driver-class-name: com.mysql.cj.jdbc.Driver
77
jpa:
88
show-sql: true
@@ -32,4 +32,4 @@ jwt:
3232
aes-secret: ${AES_SECRET}
3333
iv-secret: ${IV_SECRET}
3434

35-
domain-uri: ${DOMAIN_URI}
35+
domain-uri: "http://localhost:8080"

0 commit comments

Comments
 (0)