diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 90693c3..0bc58a4 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -6,23 +6,28 @@ server { listen 80; server_name localhost; - location / { - - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent, - X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; - add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; - add_header 'Content-Type' 'application/json'; - add_header 'Content-Length' 0; - return 204; - } - - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent, - X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; - add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; +location / { + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain; charset=utf-8'; + add_header 'Content-Length' 0; + return 204; + } + if ($request_method = 'POST') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + } + if ($request_method = 'GET') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + } proxy_pass http://backend:8080; } diff --git a/nginx/web/index.css b/nginx/web/index.css index 19a36c1..d712eab 100644 --- a/nginx/web/index.css +++ b/nginx/web/index.css @@ -12,11 +12,13 @@ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 1.5rem; text-align: center; + max-height: 650px; } #table-section { overflow-x: auto; overflow-y: auto; + max-height: 500px; } #map { diff --git a/nginx/web/index.html b/nginx/web/index.html index b3c2b7a..2b9ea9d 100644 --- a/nginx/web/index.html +++ b/nginx/web/index.html @@ -40,7 +40,7 @@ }
-

Rainfall Statistics

+

Rainfall Statistics | Rain map

Today rain/hr.