mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 15:53:23 +02:00
Change all "api" URLs. Ideally the path prefix would be an option.
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = function(options) {
|
||||
app.set('case sensitive routing', true)
|
||||
app.set('trust proxy', true)
|
||||
|
||||
;['/api/v1/auth/*', '/static/auth/*', '/auth/*'].forEach(function(route) {
|
||||
;['/static/auth/*', '/auth/*'].forEach(function(route) {
|
||||
app.all(route, function(req, res) {
|
||||
proxy.web(req, res, {
|
||||
target: options.authUrl
|
||||
@@ -27,7 +27,7 @@ module.exports = function(options) {
|
||||
})
|
||||
})
|
||||
|
||||
;['/api/v1/s/image/*'].forEach(function(route) {
|
||||
;['/s/api/v1/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) {
|
||||
})
|
||||
})
|
||||
|
||||
;['/api/v1/s/apk/*'].forEach(function(route) {
|
||||
;['/s/api/v1/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) {
|
||||
})
|
||||
})
|
||||
|
||||
;['/api/v1/s*'].forEach(function(route) {
|
||||
;['/s/api/v1/*'].forEach(function(route) {
|
||||
app.all(route, function(req, res) {
|
||||
proxy.web(req, res, {
|
||||
target: options.storageUrl
|
||||
|
||||
Reference in New Issue
Block a user