Skip to content

Commit

Permalink
fix: Correct sub-domain Service-routing issue (#239)
Browse files Browse the repository at this point in the history
rentallect authored Jan 17, 2025
1 parent e084ed2 commit 70427d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZitiFirstStrategy.ts
Original file line number Diff line number Diff line change
@@ -611,7 +611,7 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ {
// Don't muck with URL only because top-level domain of target matches the top-level domain of the load-balancer.
// Only do that if the entire hostname matches, or else sub-domains represented by different Services will be routed
// to the wrong place.
if (!isEqual(newUrl.hostname, this._zitiBrowzerServiceWorkerGlobalScope._zitiConfig.browzer.bootstrapper.self.host)) {
if (isEqual(newUrl.hostname, this._zitiBrowzerServiceWorkerGlobalScope._zitiConfig.browzer.bootstrapper.self.host)) {

newUrl.hostname = this._zitiBrowzerServiceWorkerGlobalScope._zitiConfig.browzer.bootstrapper.target.service;
newUrl.port = this._zitiBrowzerServiceWorkerGlobalScope._zitiConfig.browzer.bootstrapper.target.port;

0 comments on commit 70427d9

Please sign in to comment.