Skip to content

Commit 01a2f4f

Browse files
committed
removed case dependency for ARM params
1 parent 429f90e commit 01a2f4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/services/armService.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class AzureResourceManagementService {
6464
}
6565

6666
public async loadSessionSettings(): Promise<void> {
67-
const url = new URL(location.href);
67+
const url = new URL(location.href.toLowerCase());
6868
const subscriptionId = this.getStoredSetting(url, SettingNames.subscriptionId);
6969
const resourceGroupName = this.getStoredSetting(url, SettingNames.resourceGroupName);
7070
const serviceName = this.getStoredSetting(url, SettingNames.serviceName);
@@ -80,13 +80,14 @@ export class AzureResourceManagementService {
8080
const managementApiUrl = `https://${armEndpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.ApiManagement/service/${serviceName}`;
8181
await this.settingsProvider.setSetting(SettingNames.managementApiUrl, managementApiUrl);
8282
await this.settingsProvider.setSetting(SettingNames.backendUrl, `https://${serviceName}.developer.azure-api.net`);
83-
if(url.searchParams.has(SettingNames.subscriptionId)) {
83+
if(url.searchParams.has(SettingNames.subscriptionId.toLowerCase())) {
8484
location.href = location.origin + location.pathname;
8585
}
8686
}
8787
}
8888

8989
private getStoredSetting(url: URL, settingName: string): string {
90+
settingName = settingName.toLowerCase();
9091
let settingValue = url.searchParams.get(settingName);
9192
if (settingValue) {
9293
settingValue = decodeURIComponent(settingValue);

0 commit comments

Comments
 (0)