mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 07:13:23 -04:00
fix(settings): Use axios directly for health check to preven URL sanitizing
When using Apache with `DirectorySlash` it will respond with 301 and the URL with trailing slash. But when using traefik as the reverse proxy it can not rewrite redirects, this leads to the problem that the Apache response is using HTTP in the redirect but the real server (traefik) is only listening on HTTPS. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
5649cddccb
commit
6e52a19b96
3 changed files with 6 additions and 5 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
import api from './api.js'
|
||||
import Vue from 'vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError, showInfo } from '@nextcloud/dialogs'
|
||||
|
||||
|
|
@ -186,13 +187,13 @@ const actions = {
|
|||
})
|
||||
|
||||
// check for server health
|
||||
return api.get(generateUrl('apps/files/'))
|
||||
return axios.get(generateUrl('apps/files/'))
|
||||
.then(() => {
|
||||
if (response.data.update_required) {
|
||||
showInfo(
|
||||
t(
|
||||
'settings',
|
||||
'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'
|
||||
'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.',
|
||||
),
|
||||
{
|
||||
onClick: () => window.location.reload(),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue