fix/correctif-sec #12

Merged
kevin merged 3 commits from fix/correctif-sec into develop 2026-03-13 08:48:27 +00:00
Collaborator

fix/correctif-sec

fix/correctif-sec
kevin self-assigned this 2026-03-12 08:02:51 +00:00
kevin added 2 commits 2026-03-12 08:02:51 +00:00
kevin requested review from matthieu 2026-03-12 08:02:51 +00:00
matthieu approved these changes 2026-03-13 08:20:44 +00:00
@@ -164,2 +168,3 @@
method: "POST",
body: { key }
body: { key },
headers: apiAuthHeader
Owner

tu peux créer un fetch global avec apiAuthHeader intégrré automatiquement pour tes deux type de fetch

tu peux créer un fetch global avec apiAuthHeader intégrré automatiquement pour tes deux type de fetch
@@ -69,3 +81,3 @@
const data = new Uint8Array(size)
const start = performance.now()
await fetch('/api/upload', { method: 'POST', body: data })
const response = await fetch('/api/upload', withApiAuth({ method: 'POST', body: data }))
Owner

Idem ici inclure en auto withApiAuth dans un fetch global

Idem ici inclure en auto withApiAuth dans un fetch global
nuxt.config.ts Outdated
@@ -37,2 +37,4 @@
runtimeConfig: {
apiSecretKey: process.env.API_SECRET_KEY,
public: {
apiSecretKey: process.env.API_SECRET_KEY || "",
Owner

runtimeConfig: {
apiSecretKey: process.env.API_SECRET_KEY,
public: {
apiSecretKey: process.env.API_SECRET_KEY || "",

PK il y est deux fois

runtimeConfig: { apiSecretKey: process.env.API_SECRET_KEY, public: { apiSecretKey: process.env.API_SECRET_KEY || "", PK il y est deux fois
pages/backup.vue Outdated
@@ -121,2 +123,3 @@
const fetchLatestBackup = async (folder: string) => {
const files = await $fetch<string[]>(`/api/backups?folder=${encodeURIComponent(folder)}`)
const files = await $fetch<string[]>(`/api/backups?folder=${encodeURIComponent(folder)}`, {
headers: apiAuthHeader
Owner

ici fetch global et les autres endroit

ici fetch global et les autres endroit
kevin added 1 commit 2026-03-13 08:47:35 +00:00
kevin merged commit e52fbaf799 into develop 2026-03-13 08:48:27 +00:00
kevin deleted branch fix/correctif-sec 2026-03-13 08:48:27 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MALIO-DEV/Supervisor#12