Skip to content

Commit

Permalink
HOTFIX-33 : SSL 인증서 적용 설정 작업 (#35)
Browse files Browse the repository at this point in the history
* 8081 -> 443 https 포트 변경

* healthCheck 추가

* / -> /health-check 변경

* securityConfig -> /health-check 추가

* swagger https 요청 불가 현상 해결
  • Loading branch information
jhkang1517 authored Feb 20, 2024
1 parent fd2804d commit 53edd17
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/mara/server/auth/security/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class SecurityConfig(
"/users/**",
"favicon.ico",
"/error",
"/h2-console/**"
"/h2-console/**",
"/health-check"
) // sign-up, sign-in 추가

@Bean
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/mara/server/config/swagger/SwaggerConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.security.SecuritySchemes
import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Info
import io.swagger.v3.oas.models.security.SecurityRequirement
import io.swagger.v3.oas.models.servers.Server
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

Expand All @@ -32,6 +33,7 @@ class SwaggerConfig {
@Bean
fun openAPI(): OpenAPI {
return OpenAPI()
.addServersItem(Server().url("/"))
.addSecurityItem(SecurityRequirement().addList("jwtAuth"))
.addSecurityItem(SecurityRequirement().addList("Refresh-Token"))
.info(apiInfo())
Expand Down
14 changes: 14 additions & 0 deletions src/main/kotlin/mara/server/domain/HealthController.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package mara.server.domain

import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@RestController
class HealthController {

@GetMapping("/health-check")
fun healthCheck(): HttpStatus {
return HttpStatus.OK
}
}

0 comments on commit 53edd17

Please sign in to comment.