修改nginx的配置文件,添加client_max_body_size 欄位 註:client_max_body_size 必須要放在server下的server_name下,而不是放在location欄位下麵 ...
修改nginx的配置文件,添加client_max_body_size 欄位
註:client_max_body_size 必須要放在server下的server_name下,而不是放在location欄位下麵
server { listen 80; server_name www.abc.com; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials true; add_header Access-Control-Allow-Headers *; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; client_max_body_size 10M; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Request-ID $global_request_id; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; proxy_pass http://192.168.1.1:8080; } }