diff --git a/Deployment/nginx.conf b/Deployment/nginx.conf index 64ba68d80..22c252869 100644 --- a/Deployment/nginx.conf +++ b/Deployment/nginx.conf @@ -39,6 +39,10 @@ http { more_set_headers 'Access-Control-Allow-Headers: *'; more_set_headers 'Access-Control-Allow-Methods: POST, PUT, PATCH, GET, DELETE, OPTIONS, HEAD'; + if ($request_method = 'OPTIONS') { + return 204; + } + location /auth { proxy_pass http://docker-auth; } @@ -76,9 +80,10 @@ http { rewrite ^/sapi(.*)$ $1 break; } - location /api/v3/klines { + location /binance { proxy_set_header Host api.binance.com; proxy_pass https://api.binance.com; + rewrite ^/binance/(.*)$ /$1 break; } } }