Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,4 @@ jobs:
version_label: github-action-${{ steps.current-time.outputs.formattedTime }}
region: ap-northeast-2
deployment_package: Dockerrun.aws.json
wait_for_environment_recovery: 180

- name: SSH into EC2 and install Node Exporter
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_PRIVATE_KEY }}
script: |
wget https://github.com/prometheus/node_exporter/releases/download/v1.9.0/node_exporter-1.9.0.linux-amd64.tar.gz
tar xvfz node_exporter-1.9.0.linux-amd64.tar.gz
cd node_exporter-1.9.0.linux-amd64
sudo systemctl start node_exporter
wait_for_environment_recovery: 180
2 changes: 1 addition & 1 deletion .platform/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ http {
}

location /metrics {
proxy_pass http://localhost:9100;
proxy_pass http://127.0.0.1:9100/metrics;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
"/health",
"/kakao/**",
"/api/auth/login",
"/api/auth/testjoin",
"api/auth/testlogin",
"/api/auth/testlogin",
"/actuator/**",
"/metrics/**")
.permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;

String requestURI = httpRequest.getRequestURI();
if (requestURI.startsWith("/metrics") || requestURI.startsWith("/actuator")) {
filterChain.doFilter(request, response);
return;
}

// 헤더에서 JWT 토큰을 가져옴
String token = jwtProvider.resolveToken(httpRequest);

Expand Down
Loading