We've followed through the guide: https://nmmhelp.getnerdio.com/hc/en-us/articles/26125614980493-How-to-Customize-the-Nerdio-Manager-URL
We then restricted access to the old URL as it's no longer required.
This lets you set a custom URL however when running Nerdio updates the script will now fail if you just copy and paste the script block presented when hitting deploy. Below is a section of the command that's copy pasted to Azure Cloud Shell where you can see it gives the shell the app name variable.
& ([ScriptBlock]::Create((Invoke-RestMethod 'https://nmm-live-maintenance.azurewebsites.net/api/packages/6.2.1/script/update' -Method POST -Body '{"app":"web-admin-portal-****"This is important because half way through the update script it will attempt to reference this URL several times, most notably the first step to fail is when it runs the “Check-WebAppAvailabilityWithRetries” function.
It uses the $webAppUrl which is built by combining 2 other variables, I've cut out just the 4 lines that are important to building the script block that fails:
$webAppName = 'web-admin-portal-****'
$websitesSuffix = "azurewebsites.net"
$webAppUrl = "https://$webAppName.$websitesSuffix/"
Invoke-RestMethod -Uri $WebAppUrl -Method Get | Out-Null
Because it checks the old URL that's no longer in use the script will fail, I can work around this by setting the $webAppUrl variable to our new custom URL but I was hoping this functionality could be built in so that we can return to clicking copy and paste on the update script for quick deployments rather than having to manually edit the script or re-enabling access to the old unused URL.
Comments (1 comment)