Proxying right in FE config
Change-Id: I745f756f583a874284478cf07e3d9b3f99fe9dcf
diff --git a/nginx.conf b/nginx.conf
index 6150ae8..1e5b404 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -4,26 +4,31 @@
#charset koi8-r;
access_log /var/log/nginx/log/xos-spa-gui.access.log main;
- error_log /var/log/nginx/log/xos-spa-gui.error.log warn;
+ error_log /var/log/nginx/log/xos-spa-gui.error.log debug;
location / {
- root /var/www/dist;
- index index.html index.htm;
+ root /var/www/dist;
+ index index.html index.htm;
}
# Redirect for FE config
- location /spa {
- root /var/www/dist;
- index index.html index.htm;
+
+ location /spa/ {
+ rewrite ^/spa/(.*)$ /$1;
}
- location /spa/api {
+ location /api {
resolver 127.0.0.1 valid=30s;
- proxy_pass http://xos-rest-gw:3000;
+ proxy_pass http://xos-rest-gw:3000;
+ # proxy_redirect http://xos-rest-gw:3000/spa /;
}
- location /spa/socket.io {
+ location /socket.io {
resolver 127.0.0.1 valid=30s;
- proxy_pass http://xos-rest-gw:3000;
+ proxy_pass http://xos-rest-gw:3000;
+ # proxy_redirect http://xos-rest-gw:3000/spa /;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
}
}
\ No newline at end of file