Skip to content

Commit 5dfbac8

Browse files
susnuxbackportbot[bot]
authored andcommitted
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 <[email protected]>
1 parent 84e9aff commit 5dfbac8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/settings/src/store/apps.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import api from './api.js'
77
import Vue from 'vue'
8+
import axios from '@nextcloud/axios'
89
import { generateUrl } from '@nextcloud/router'
910
import { showError, showInfo } from '@nextcloud/dialogs'
1011
import { loadState } from '@nextcloud/initial-state'
@@ -191,7 +192,7 @@ const actions = {
191192
})
192193

193194
// check for server health
194-
return api.get(generateUrl('apps/files/'))
195+
return axios.get(generateUrl('apps/files/'))
195196
.then(() => {
196197
if (response.data.update_required) {
197198
showInfo(

0 commit comments

Comments
 (0)