diff --git a/README.md b/README.md index 232d4fa..83d1e69 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# OPEX-Nginx -Nginx's docker configurations for OPEX exchange +# reverse-proxy +Configuring NGINX as reverse proxy for OPEX exchange \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 5cd9b44..5324c4b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -71,6 +71,11 @@ http { proxy_hide_header Access-Control-Allow-Headers; proxy_hide_header Access-Control-Allow-Methods; + add_header Access-Control-Allow-Credentials false always; + add_header Access-Control-Allow-Origin * always; + add_header Access-Control-Allow-Headers * always; + add_header Access-Control-Allow-Methods 'POST, PUT, PATCH, GET, DELETE, OPTIONS, HEAD' always; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -135,11 +140,6 @@ http { limit_req zone=default burst=5 nodelay; - add_header Access-Control-Allow-Credentials false always; - add_header Access-Control-Allow-Origin * always; - add_header Access-Control-Allow-Headers * always; - add_header Access-Control-Allow-Methods 'POST, PUT, PATCH, GET, DELETE, OPTIONS, HEAD' always; - if ($request_method = 'OPTIONS') { return 204; }