Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
2
-
Description
Problem
Ideally we want the base URL to match the actual URL used for accessing Confluence, as a mismatch can cause various issues:
If that's not possible, it would be nice to have a way to acknowledge and disable the URL mismatch notification pop-up.
Suggested Solution
Add an option for the user to acknowledge the mismatch, and disable the URL notifications from popping up on subsequent pages.
Why This Is Important
Empowers admins to have additional control over their network configuration.
Workaround
In previous versions of Confluence we could follow the workaround suggested in the Your URL doesn't match warning' displayed in Confluence 6.1 or later KB.
However, the option to manually disable this from the UPM menu is no longer available in Confluence 7.4.0.
We can use CURL commands and send REST API calls to disable a specific module and prevent this warning from being displayed:
1 - Finding the UPM Token
First we need to fetch the UPM token value, which consists of 19 random numeric characters, such as:
6242977409719038038
Please notice that the UPM token value changes after a restart.
Replace the values in the first 3 lines in order to create session variables:
CONFLUENCE_BASE_URL=<Confluence Base URL> ADMIN_USRNAME=<local admin account username> ADMIN_PWD=<local admin account password>
After setting those 3 session variables, run the following command:
UPM_TOKEN=$(curl -I --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Accept: application/vnd.atl.plugins.installed+json' ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/?os_authType=basic' 2>/dev/null | grep 'upm-token' | cut -d " " -f 2 | tr -d '\r')
We can check if it was successful by displaying the contents for $UPM_TOKEN:
echo $UPM_TOKEN
2 - Disabling the 'baseurl-resource' module
All session variables should already contain proper values, so just run the following command to disable the module:
curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Content-Type: application/vnd.atl.plugins.plugin.module+json' -X PUT ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-baseurl-plugin-key/modules/baseurl-resource-key?token='${UPM_TOKEN} --data '{"key":"baseurl-resource","completeKey":"com.atlassian.confluence.plugins.confluence-baseurl-plugin:baseurl-resource","links":{"self":"/c744/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-baseurl-plugin-key/modules/baseurl-resource-key","modify":"/c744/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-baseurl-plugin-key/modules/baseurl-resource-key","plugin":"/c744/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-baseurl-plugin-key"},"enabled":false,"optional":false,"recognisableType":true,"broken":false}'
Once done, the error message should disappear.
We can confirm that this specific module was disabled from the UPM menu (Manage apps) by checking the Confluence Base URL plugin and expanding the existing modules.
We can use the same procedure to re-enable this module by changing the "enabled":false to "enabled":true boolean.