Skip to content
Snippets Groups Projects
Commit c9301b2d authored by 汤绍坚's avatar 汤绍坚
Browse files

tsj: 修改cooglMap js代理的问题

parent 49a205d9
Branches
Tags city_1.0.5-arm
No related merge requests found
...@@ -28,22 +28,22 @@ ...@@ -28,22 +28,22 @@
proxy_redirect default; proxy_redirect default;
} }
location /region { # location /region {
rewrite ^/region/(.*)$ /kelan/$1 break; # rewrite ^/region/(.*)$ /kelan/$1 break;
add_header Access-Control-Allow-Origin *; # add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; # add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
proxy_pass https://10.1.174.34:13600; # proxy_pass https://10.1.174.34:13600;
proxy_redirect default; # proxy_redirect default;
} # }
location /grid-range { # location /grid-range {
rewrite ^/grid-range/(.*)$ /grid-range/$1 break; # rewrite ^/grid-range/(.*)$ /grid-range/$1 break;
add_header Access-Control-Allow-Origin *; # add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; # add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
proxy_pass https://10.1.174.34:13600; # proxy_pass https://10.1.174.34:13600;
proxy_redirect default; # proxy_redirect default;
} # }
} }
\ No newline at end of file
...@@ -8,6 +8,8 @@ const CooGL = window.CooGL; ...@@ -8,6 +8,8 @@ const CooGL = window.CooGL;
// 调试开关 // 调试开关
const DEBUG = false; const DEBUG = false;
const IS_PROD = process.env.NODE_ENV === 'production' ? true : false;
// API基础URL配置 // API基础URL配置
const API_BASE_URLS = { const API_BASE_URLS = {
// 直接地址 // 直接地址
...@@ -17,8 +19,8 @@ const API_BASE_URLS = { ...@@ -17,8 +19,8 @@ const API_BASE_URLS = {
}, },
// 相对地址(代理) // 相对地址(代理)
PROXY: { PROXY: {
REGION_API: '/region/coogl/api', REGION_API: IS_PROD?'/cd-comprehensive/region/coogl/api':'/region/coogl/api',
GRID_RANGE_API: '/grid-range' GRID_RANGE_API: IS_PROD?'/cd-comprehensive/grid-range':'/grid-range'
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment