Skip to content

Commit

Permalink
Feat: 검색 refresh api 로컬에서 접근 가능하도록 변경 (#265)
Browse files Browse the repository at this point in the history
* Feat: Change refresh search api available at prod profile

* Config: Block refresh api from proxy.

* Config: Remove unused reverse proxy of swagger, api docs.
  • Loading branch information
huGgW authored Apr 11, 2024
1 parent e15512d commit 3213a13
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
reverse_proxy host.docker.internal:3000

@backend_denied {
path /swagger-ui/* /api-docs/*
path /swagger-ui/* /api-docs/* /api/v1/search/refresh
not remote_ip {$LOCAL_IP}
}
abort @backend_denied
Expand All @@ -16,8 +16,4 @@

# Login
reverse_proxy /oauth2/authorization/idsnucse host.docker.internal:8080

# Swagger
reverse_proxy /swagger-ui/* host.docker.internal:8080
reverse_proxy /api-docs/* host.docker.internal:8080
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.wafflestudio.csereal.core.main.api

import com.wafflestudio.csereal.core.main.dto.MainResponse
import com.wafflestudio.csereal.core.main.service.MainService
import org.springframework.context.annotation.Profile
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
Expand All @@ -17,7 +16,6 @@ class MainController(
return mainService.readMain()
}

@Profile("!prod")
@GetMapping("/search/refresh")
fun refreshSearches() {
mainService.refreshSearch()
Expand Down

0 comments on commit 3213a13

Please sign in to comment.