From 3b775a7fab70d2d36438880347ab265e6159cdc1 Mon Sep 17 00:00:00 2001 From: Saturn-V Date: Tue, 17 Oct 2023 14:33:45 -0700 Subject: [PATCH] update proxy config --- next.config.js | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/next.config.js b/next.config.js index 5c9b58d..5bbd903 100644 --- a/next.config.js +++ b/next.config.js @@ -2,20 +2,44 @@ module.exports = { async rewrites() { return [ { + has: [ + { + type: 'host', + value: 'rancher.vzxy.net', + }, + ], source: '/', - destination: '/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy/' // Proxy to Backend + destination: '/api/v1/namespaces/sammwise/services/http%3sammwise%380/proxy' // Proxy to Backend }, { - source: '/about', - destination: '/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy/about' // Proxy to Backend + has: [ + { + type: 'host', + value: 'rancher.vzxy.net', + }, + ], + source: '/api/:path*/about', + destination: '/api/v1/namespaces/sammwise/services/http%3sammwise%380/proxy/about' // Proxy to Backend }, { + has: [ + { + type: 'host', + value: 'rancher.vzxy.net', + }, + ], source: '/assessment', - destination: '/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy/assessment' // Proxy to Backend + destination: '/api/v1/namespaces/sammwise/services/http%3sammwise%380/proxy/assessment' // Proxy to Backend }, { + has: [ + { + type: 'host', + value: 'rancher.vzxy.net', + }, + ], source: '/results', - destination: '/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy/results' // Proxy to Backend + destination: '/api/v1/namespaces/sammwise/services/http%3sammwise%380/proxy/results' // Proxy to Backend } ] }