Skip to content

Commit

Permalink
Merge pull request #37 from Tico-Corp/fix-be/TICO-215-resolve-swagger…
Browse files Browse the repository at this point in the history
…-ui-error

[FIX] Nginx 프록시 서버 설정 변경 (TICO-215)
  • Loading branch information
bu119 authored Jul 12, 2024
2 parents 79a4044 + b4ea659 commit 132a0d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ public class SecurityConfig {

private static final String[] swaggerURL = {
"/graphiql", "/graphql",
"/swagger-ui/**", "/swagger-ui.html",
"/v3/api-docs/**", "/api-docs/**",
"/swagger-ui/index.html/**",
"/swagger-resources/**", "/swagger-ui/**", "/v3/api-docs", "/api-docs/**"
"/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/swagger-resources/**"
};

// 스프링 시큐리티 기능 비활성화 ('인증','인가' 서비스 적용x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Tag(name = "root", description = "애플리케이션 기본 정보 API")
@Tag(name = "Root", description = "애플리케이션 기본 정보 API")
@RestController
@RequiredArgsConstructor
@RequestMapping("/")
Expand Down
9 changes: 7 additions & 2 deletions nginx/conf/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ server {
ssl_certificate_key /etc/letsencrypt/live/pomorodo.shop/privkey.pem;

# 원하는 서비스를 제공하는 2차 라우팅
location /api {
proxy_pass http://pomorodo.shop:8080/api;
location / {
proxy_pass http://pomorodo.shop:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# /api 경로 프록시 설정
location /api {
proxy_pass http://localhost:8080/api;
}
}
}

0 comments on commit 132a0d6

Please sign in to comment.