Skip to content

Commit

Permalink
Merge pull request #45765 from nextcloud/fix/health-check-traefik
Browse files Browse the repository at this point in the history
fix(settings): Use axios directly for health check to preven URL sanitizing
  • Loading branch information
susnux authored Jun 10, 2024
2 parents 1e8eedf + 7226b01 commit 31cae5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apps/settings/src/store/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
import { loadState } from '@nextcloud/initial-state'
Expand Down Expand Up @@ -197,13 +198,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(),
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

0 comments on commit 31cae5d

Please sign in to comment.