Portfolio
My Blog
Scroll down to discover
Search
Categories

Cấu hình proxy nodejs trên nginx

December 18, 2017Category : Code/Web

Add nginx conf

location /cors4all/ {
client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;

proxy_pass http://127.0.0.1:8080/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
}

01.
© Oliver / All rights reserved.
To top