Commit 0de1cc07 by ningfd

添加了前后端的路由合并

1 parent 96bc7124
......@@ -3,11 +3,10 @@ data:
production-base.js: |
const productionHost = {
'baseUrl': 'kpl_backend/api/v1',
'rootUrl': 'kpl_backend',
'rootUrl': 'kpl_backend/api/v1',
'baseWebSocket': 'kpl_back_socket/api/v1',
'imageProxyUrl': 'kpl_imageproxy',
'apiTestUrl': 'mobile_frontend',
'adminUrl': 'kpl_admin_frontend/admin/login',
'apiTestUrl': 'kpl_backend/mobile',
'adminUrl': 'kpl_backend/admin/login',
}
kind: ConfigMap
metadata:
......
......@@ -12,7 +12,11 @@ data:
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://kpl--backend:8919;
resolver kube-dns.kube-system.svc.cluster.local valid=5s;
proxy_pass http://kpl--frontend.kpl.svc.cluster.local:80$request_uri;
}
location ^~ /api/v1 {
proxy_pass http://kpl--backend.kpl.svc.cluster.local:8919$request_uri;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 3600s;
......@@ -45,56 +49,6 @@ data:
root /etc/nginx;
}
}
deployproxy.conf: |
server {
listen 81;
location / {
proxy_pass http://kpl--deploy:8921;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
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";
client_max_body_size 50m;
}
location = /basic_status {
stub_status;
}
error_page 502 /502.html;
location = /502.html {
root /etc/nginx;
}
}
imageproxy.conf: |
server {
listen 82;
location / {
proxy_pass http://kpl--image-proxy:8922/;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
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";
client_max_body_size 50m;
}
location = /basic_status {
stub_status;
}
error_page 502 /502.html;
location = /502.html {
root /etc/nginx;
}
}
nginx.conf: |
user nginx;
worker_processes 2;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!