Skip to content

개발 편의를 위한 http 허용#9

Open
AhnJoonSung wants to merge 1 commit intomainfrom
feat/serv-http
Open

개발 편의를 위한 http 허용#9
AhnJoonSung wants to merge 1 commit intomainfrom
feat/serv-http

Conversation

@AhnJoonSung
Copy link
Copy Markdown
Member

🔧 변경 내용 (What)

  • 자가 서명된 인증서(Self-signed certificate)에 대한 브라우저 차단 문제를 회피하기 위해
    기존에 HTTP 요청을 HTTPS로 리다이렉트하던 로직을 제거하고,
    HTTP 요청도 직접 서빙하도록 변경했습니다.

🎯 변경 배경 (Why)

  • 개발 환경에서는 자가 서명 인증서를 사용 중이며,
  • 일부 브라우저(특히 Chrome 기반)에서 HTTPS 접속 시 보안 경고 또는 차단 발생
  • 이로 인해 프론트엔드/백엔드 기능 테스트가 불편한 상황 발생
  • 따라서 개발 단계에서만 HTTP 요청을 별도의 리다이렉션 없이 바로 처리할 수 있도록 설정

자가 인증서에 대한 브라우저 차단으로 인해
http 요청을 리다이렉트하지 않고 직접 서빙하게 변경
-> 개발 단계에서 브라우저에서 테스트 하기 위해
@AhnJoonSung AhnJoonSung self-assigned this May 18, 2025
Copilot AI review requested due to automatic review settings May 18, 2025 11:51
@AhnJoonSung AhnJoonSung added the enhancement New feature or request label May 18, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the HTTPS redirection in favor of directly serving HTTP requests to improve developer convenience in local environments.

  • Removed 301 HTTPS redirects and added multiple proxy_pass configurations in the HTTP server block for various endpoints
  • Updated CORS headers to restrict allowed origins specifically to http://localhost:3000

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nginx.conf Updated HTTP server block with direct proxy_pass settings
cors-headers.conf Modified CORS headers to allow origin http://localhost:3000
Comments suppressed due to low confidence (1)

cors-headers.conf:3

  • Ensure that limiting the allowed origin to http://localhost:3000 is intended only for development; consider implementing an environment-based configuration to prevent potential issues in production.
add_header 'Access-Control-Allow-Origin' 'http://localhost:3000' always;

Comment on lines +110 to +118
# # HTTP 서버 블록
# server {
# listen 80;

# location / {
# include /etc/nginx/common/cors-headers.conf;
# return 301 https://$host$request_uri;
# }
# }
Copy link

Copilot AI May 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the old HTTP redirection block is no longer required, consider removing these commented lines to reduce clutter in the configuration.

Suggested change
# # HTTP 서버 블록
# server {
# listen 80;
# location / {
# include /etc/nginx/common/cors-headers.conf;
# return 301 https://$host$request_uri;
# }
# }
# (Removed the commented-out HTTP server block to reduce clutter)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants