Skip to content

Commit e1fa391

Browse files
committed
Umbraco installer transform fixes for new prefix
1 parent 3687d9c commit e1fa391

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/UmbracoFileSystemProviders.Azure.Installer/InstallerController.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public InstallerStatus PostParameters(IEnumerable<Parameter> parameters)
7373
return InstallerStatus.ConnectionError;
7474
}
7575

76-
if (SaveParametersToFileSystemProvidersXdt(this.fileSystemProvidersConfigInstallXdtPath, newParameters) && SaveContainerNameToWebConfigXdt(this.webConfigXdtPath, containerName))
76+
var routePrefix = useDefaultRoute ? Azure.Constants.DefaultMediaRoute : containerName;
77+
78+
if (SaveParametersToFileSystemProvidersXdt(this.fileSystemProvidersConfigInstallXdtPath, newParameters) && SaveContainerNameToWebConfigXdt(this.webConfigXdtPath, routePrefix))
7779
{
7880
if (!ExecuteFileSystemConfigTransform() || !ExecuteWebConfigTransform())
7981
{
@@ -87,11 +89,7 @@ public InstallerStatus PostParameters(IEnumerable<Parameter> parameters)
8789
else
8890
{
8991
// merge in storage url to ImageProcessor security.config xdt
90-
string prefix = useDefaultRoute
91-
? Azure.Constants.DefaultMediaRoute
92-
: containerName;
93-
94-
SaveBlobPathToImageProcessorSecurityXdt(ImageProcessorSecurityInstallXdtPath, rootUrl, prefix, containerName);
92+
SaveBlobPathToImageProcessorSecurityXdt(ImageProcessorSecurityInstallXdtPath, rootUrl, routePrefix, containerName);
9593

9694
// transform ImageProcessor security.config
9795
if (ExecuteImageProcessorSecurityConfigTransform())
@@ -227,7 +225,7 @@ internal static bool SaveBlobPathToImageProcessorSecurityXdt(string xdtPath, str
227225
}
228226

229227
// Set the settings within the InsertIfMissing action
230-
var rawSettings = document.SelectNodes($"//services/service[@prefix = '{containerName}/' and @name = '{ImageProcessorSecurityServiceName}' and @type = '{ImageProcessorSecurityServiceType}']/settings/setting");
228+
var rawSettings = document.SelectNodes($"//services/service[@prefix = '{prefix}/' and @name = '{ImageProcessorSecurityServiceName}' and @type = '{ImageProcessorSecurityServiceType}']/settings/setting");
231229
if (rawSettings == null)
232230
{
233231
return false;

0 commit comments

Comments
 (0)