Service Discovery Session Overrides
8/31/26Less than 1 minute
Session Overrides
Tips
Session overrides let you redirect services to local or staging URLs during development without touching application config.
Store a JSON object in sessionStorage under the key "overriddenServiceDiscoveryUrls":
const overrides = {
'my-api': {
url: 'https://localhost:3000/api',
scopes: ['https://localhost/.default'],
},
};
sessionStorage.setItem('overriddenServiceDiscoveryUrls', JSON.stringify(overrides));How it works:
- Services are fetched normally from the API
- The module checks
sessionStoragefor overrides - Matching services get their
uriandscopesreplaced, and anoverridden: trueflag is set - Overrides are only applied when
sessionStorageis available
Clear overrides by removing the storage key:
sessionStorage.removeItem('overriddenServiceDiscoveryUrls');Note
Session overrides are temporary — they are cleared when the browser session ends and only affect the current tab/window.