Too much overlap in storage plugin URLs for meaningful loadbalancing and config simplicity. Make poorxy emulate the real situation and change related URLs.

This commit is contained in:
Simo Kinnunen
2015-01-07 14:04:36 +09:00
parent 7c16c40dae
commit 8b9e5d58c9
8 changed files with 70 additions and 57 deletions

View File

@@ -27,7 +27,7 @@ module.exports = function(options) {
})
})
;['/s/api/v1/image/*'].forEach(function(route) {
;['/s/image/*'].forEach(function(route) {
app.all(route, function(req, res) {
proxy.web(req, res, {
target: options.storagePluginImageUrl
@@ -35,7 +35,7 @@ module.exports = function(options) {
})
})
;['/s/api/v1/apk/*'].forEach(function(route) {
;['/s/apk/*'].forEach(function(route) {
app.all(route, function(req, res) {
proxy.web(req, res, {
target: options.storagePluginApkUrl
@@ -43,7 +43,7 @@ module.exports = function(options) {
})
})
;['/s/api/v1/*'].forEach(function(route) {
;['/s/*'].forEach(function(route) {
app.all(route, function(req, res) {
proxy.web(req, res, {
target: options.storageUrl