Nginx代理高德API(无法地图选点)
作者:互联网
前端高德地图无法地图选点
nginx直接拦截/amap转发(转发地址为当前使用的高德API版本地址)
server {
listen 80;
server_name www.test.com;
client_max_body_size 1024M;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_pass http://192.168.3.117:9094;
}
//代理高德API
location /amap {
proxy_pass https://restapi.amap.com/v3/geocode/;
}
}
标签:选点,set,header,Nginx,API,proxy,timeout,高德,amap 来源: https://blog.csdn.net/qq_34522950/article/details/123635619