Pingping Lin | 4c3919c | 2017-05-04 18:06:30 -0700 | [diff] [blame] | 1 | <IfModule proxy_module> |
| 2 | ProxyPreserveHost on |
| 3 | |
| 4 | # Map /fabric to the onos instance that is controlling the leaf |
| 5 | # spine fabric |
| 6 | <Location /fabric/> |
| 7 | ProxyPass http://onos-fabric:8181/ |
| 8 | ProxyPassReverse http://onos-fabric:8181/ |
| 9 | ProxyPassReverseCookiePath "/" "/fabric/" |
| 10 | Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/fabric$2" |
| 11 | </Location> |
| 12 | |
| 13 | <Location /fabric/onos/ui/websock/> |
| 14 | ProxyPass "ws://onos-fabric:8181/onos/ui/websock/" disablereuse=on |
| 15 | </Location> |
| 16 | |
| 17 | # Map /vtn to the onos instance that is controller the cordvtn |
| 18 | # application |
| 19 | <Location /vtn/> |
| 20 | ProxyPass http://onos-cord:8182/ |
| 21 | ProxyPassReverse http://onos-cord:8182/ |
| 22 | ProxyPassReverseCookiePath "/" "/vtn/" |
| 23 | Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/vtn$2" |
| 24 | </Location> |
| 25 | |
| 26 | <Location /vtn/onos/ui/websock/> |
| 27 | ProxyPass "ws://onos-cord:8182/onos/ui/websock/" disablereuse=on |
| 28 | </Location> |
| 29 | |
| 30 | # Map the various XOS roots to the XOS instance |
| 31 | ProxyPass /xos http://xos:8888 |
| 32 | ProxyPass /spa/api http://xos:3000/api |
| 33 | ProxyPass /xos/ http://xos:8888/ |
| 34 | ProxyPassMatch /(api)$ http://xos:8888/$1/ |
| 35 | ProxyPass /api/ http://xos:8888/api/ |
| 36 | ProxyPass /login http://xos:8888/login |
| 37 | ProxyPass /admin/ http://xos:8888/admin/ |
| 38 | ProxyPass /static/ http://xos:8888/static/ |
| 39 | ProxyPass /loggedin/ http://xos:8888/loggedin/ |
| 40 | ProxyPass /serviceGrid/ http://xos:8888/serviceGrid/ |
| 41 | |
| 42 | |
| 43 | # Cord SPA and rest-gw |
| 44 | ProxyPass /spa http://xos:4000 |
| 45 | ProxyPass /spa/api http://xos:3000/api |
| 46 | ProxyPass /spa/socket.io http://xos:3000/socket.io |
| 47 | ProxyPass /socket.io http://xos:3000/socket.io |
| 48 | |
| 49 | ProxyPass /viv/ http://salty-interest:8081/ |
| 50 | ProxyPass /viv http://salty-interest:8081 |
| 51 | ProxyPass /telem http://salty-interest:8081/telem |
| 52 | ProxyPass /telemReset http://salty-interest:8081/telemReset |
| 53 | |
| 54 | # ProxyPass /cookies/api http://10.6.0.153:8000/api |
| 55 | <LocationMatch "/cookies/api"> |
| 56 | ProxyPass http://10.6.0.142:8000/api |
| 57 | Header set "Access-Control-Allow-Origin" "*" |
| 58 | Header set "Access-Control-Allow-Methods" "POST, GET, OPTIONS, DELETE, PUT" |
| 59 | Header set "Access-Control-Allow-Headers" "x-sessionid, x-csrftoken, Content-Type" |
| 60 | </LocationMatch> |
| 61 | <LocationMatch "/spa/cookies/api"> |
| 62 | ProxyPass http://10.6.0.142:8000/api |
| 63 | Header set "Access-Control-Allow-Origin" "*" |
| 64 | Header set "Access-Control-Allow-Methods" "POST, GET, OPTIONS, DELETE, PUT" |
| 65 | Header set "Access-Control-Allow-Headers" "x-sessionid, x-csrftoken, Content-Type" |
| 66 | </LocationMatch> |
| 67 | <Location /socket.io> |
| 68 | RewriteEngine on |
| 69 | RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] |
| 70 | RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] |
| 71 | RewriteRule .* ws://xos:3000%{REQUEST_URI} [P] |
| 72 | </Location> |
| 73 | |
| 74 | </IfModule> |
| 75 | |
| 76 | <IfModule rewrite_module> |
| 77 | RewriteEngine On |
| 78 | # Redirect (permanently) requests for /MAAS to /MAAS/. |
| 79 | RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L] |
| 80 | </IfModule> |
| 81 | |
| 82 | # Redirects so that basic URLs entered go the right place |
| 83 | Redirect /fabric /fabric/onos/ui |
| 84 | Redirect /vtn /vtn/onos/ui |