AWS Elasticbeanstalk의 Nginx 설정 바꾸기

태그
AWS ElasticBeanstalk
미완성

노트

  • 예를 들어 CORS 처리를 위한 설정을 다음과 같이 설정한다고 쳐보자(Preflight 요청 처리)
server { server_name api.myeats.me; location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, PATCH, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization'; add_header 'Access-Control-Max-Age' 86400; return 204; } add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Content-Type' 'application/json' always; proxy_pass http://localhost:5000/; } }
  • Ngin
    • ....
    • ....

    요약

    📌
    요약: