diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-10-24 14:51:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 14:51:15 +0200 |
commit | df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3 (patch) | |
tree | 4148415b3f3d9261857e7e81b85efe278492a6f3 /core/js/setupchecks.js | |
parent | 37718ddc0a82bf4207a56d5dc36b99667650a56e (diff) | |
parent | 20a5ce217a47c9e3d5dd4016e96e0cc557c51417 (diff) | |
download | nextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.tar.gz nextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.zip |
Merge pull request #11396 from nextcloud/wellknown-webfinger
adding .well-known/webfinger
Diffstat (limited to 'core/js/setupchecks.js')
-rw-r--r-- | core/js/setupchecks.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index aa59cc8181b..ca7d979f5f3 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -52,9 +52,14 @@ * @param url the URL to test * @param placeholderUrl the placeholder URL - can be found at oc_defaults.docPlaceholderUrl * @param {boolean} runCheck if this is set to false the check is skipped and no error is returned + * @param {int} expectedStatus the expected HTTP status to be returned by the URL, 207 by default * @return $.Deferred object resolved with an array of error messages */ - checkWellKnownUrl: function(url, placeholderUrl, runCheck) { + checkWellKnownUrl: function(url, placeholderUrl, runCheck, expectedStatus) { + if (expectedStatus === undefined) { + expectedStatus = 207; + } + var deferred = $.Deferred(); if(runCheck === false) { @@ -63,7 +68,7 @@ } var afterCall = function(xhr) { var messages = []; - if (xhr.status !== 207) { + if (xhr.status !== expectedStatus) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-setup-well-known-URL'); messages.push({ msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', { docLink: docUrl, url: url }), |