From 3a59db43963d592ed425a7a2fb4d288150a2db6f Mon Sep 17 00:00:00 2001 From: toychip Date: Sun, 4 Aug 2024 09:48:41 +0900 Subject: [PATCH] fix: cors test25 --- .../nginx/conf.d/elasticbeanstalk/00_application.conf | 6 ++++++ .platform/nginx/nginx.conf | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf index 3a5abf15..454b076b 100644 --- a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf +++ b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf @@ -14,6 +14,12 @@ server { gzip_comp_level 4; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + location /health { + access_log off; + return 200 'OK'; + add_header Content-Type text/plain; + } + location / { proxy_pass http://127.0.0.1:5000; proxy_http_version 1.1; diff --git a/.platform/nginx/nginx.conf b/.platform/nginx/nginx.conf index a0fd8bea..6a108fc5 100644 --- a/.platform/nginx/nginx.conf +++ b/.platform/nginx/nginx.conf @@ -30,6 +30,15 @@ http { server { listen 80 default_server; server_name dojo-backend-eb-env.eba-33qhzuax.ap-northeast-2.elasticbeanstalk.com; - return 301 https://$host$request_uri; + + location /health { + access_log off; + return 200 'OK'; + add_header Content-Type text/plain; + } + + location / { + return 301 https://$host$request_uri; + } } }