@
donglongfei2008 location ^~ /xxxx/map/ {
add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods "GET, POST, PUT, OPTIONS";
if ($request_method = 'OPTIONS') {
return 204;
}
proxy_pass
https://m.amap.com/; proxy_redirect off;
proxy_set_header Host '
m.amap.com';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_read_timeout 600s;
proxy_send_timeout 300s;
proxy_temp_file_write_size 256k;
}