]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(settings): Use axios directly for health check to preven URL sanitizing
authorFerdinand Thiessen <opensource@fthiessen.de>
Mon, 10 Jun 2024 14:08:50 +0000 (16:08 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 8 Oct 2024 13:51:46 +0000 (13:51 +0000)
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>
apps/settings/src/store/apps.js

index ed5a72453711147ce98195ddba4532a176bb64ac..75871623b43bf9c8d339bbf4d1b57bf8e4458d50 100644 (file)
@@ -5,6 +5,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'
 import { loadState } from '@nextcloud/initial-state'
@@ -178,7 +179,7 @@ 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(