Compare commits

..

2 Commits

Author SHA1 Message Date
ce37fafddf Version
Some checks failed
Build release Docker image / Build Docker Images (push) Failing after 4m15s
2026-02-26 14:00:08 +01:00
04c4f7839f v0.13.2 : fix admin 2026-02-26 13:59:48 +01:00
8 changed files with 49768 additions and 12978 deletions

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env sh #!/usr/bin/env sh
. "$HOME/.nvm/nvm.sh" #. "$HOME/.nvm/nvm.sh"
node scripts/check-version.js #node scripts/check-version.js

View File

@@ -1,57 +1,23 @@
export default [ export default [
"strapi::logger", "strapi::logger",
"strapi::errors", "strapi::errors",
//'strapi::security', "strapi::security",
{ "strapi::cors",
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:", "http:"],
"img-src": [
"'self'",
"data:",
"blob:",
"market-assets.strapi.io",
"192.168.0.211:9000",
"container.harmonylab.ovh",
],
"media-src": [
"'self'",
"data:",
"blob:",
"market-assets.strapi.io",
"192.168.0.211:9000",
"container.harmonylab.ovh",
],
upgradeInsecureRequests: null,
},
},
},
},
{
name: "strapi::cors",
config: {
origin: ["https://back.harmonylab.ovh", "https://www.choralsync.com"],
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
headers: ["Content-Type", "Authorization", "Origin", "Accept"],
keepHeadersOnError: true,
},
},
"strapi::poweredBy", "strapi::poweredBy",
"strapi::query", "strapi::query",
"strapi::body", "strapi::body",
{ {
name: 'strapi::session', name: "strapi::session",
config: { config: {
cookie: { // Nom unique pour être sûr que le navigateur ne garde pas un vieux cookie
secure: true, // Force car tu es sur https://back.harmonylab.ovh key: "strapi_session_local_debug",
sameSite: 'lax', maxAge: 86400000,
httpOnly: true, httpOnly: true,
// FORCE à false pour que ça marche en HTTP local
secure: false,
sameSite: "lax",
}, },
}, },
},
"strapi::favicon", "strapi::favicon",
"strapi::public", "strapi::public",
]; ];

View File

@@ -1,24 +1,33 @@
import cronTasks from "./cron-tasks"; import cronTasks from "./cron-tasks";
export default ({ env }) => ({ export default ({ env }) => {
// DEBUG: On vérifie ce que Strapi reçoit vraiment
const appKeys = env.array("APP_KEYS");
console.log("------------------------------------------------");
console.log("Key Check:", appKeys.length > 0 ? "CHARGÉES ✅" : "VIDES ❌");
console.log("Key Type:", typeof appKeys[0]); // Doit afficher 'string'
console.log("Host:", env("HOST", "0.0.0.0"));
console.log("------------------------------------------------");
return {
host: env("HOST", "0.0.0.0"), host: env("HOST", "0.0.0.0"),
port: env.int("PORT", 1337), port: env.int("PORT", 1337),
proxy: true, url: env("STRAPI_URL", "http://localhost:1337"),
url: env('STRAPI_URL'),
app: { app: {
keys: env.array("APP_KEYS"), // ON FORCE UN TABLEAU EN DUR ICI :
keys: [
"UneSuperClefSecreteTresLongueEtAleatoire123",
"UneAutreClefDeSecours456",
],
}, },
cron: { cron: {
enabled: true, enabled: true,
tasks: cronTasks, tasks: cronTasks,
}, },
proxy: false,
admin: { admin: {
auth: { auth: {
events: { secret: env("ADMIN_JWT_SECRET"),
onConnectionSuccess(e) {
console.log('Login success for:', e.user.email);
}, },
}, },
}, };
}, };
});

11281
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "harmony-back", "name": "harmony-back",
"version": "0.13.1", "version": "0.13.2",
"private": true, "private": true,
"description": "A Strapi application", "description": "A Strapi application",
"scripts": { "scripts": {
@@ -29,6 +29,7 @@
"styled-components": "^6.0.0" "styled-components": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/minimatch": "^6.0.0",
"@types/node": "^20", "@types/node": "^20",
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",

View File

@@ -1,13 +1,21 @@
import type { Core } from "@strapi/strapi"; import type { Core } from "@strapi/strapi";
export default { export default {
/** /**
* An asynchronous register function that runs before * An asynchronous register function that runs before
* your application is initialized. * your application is initialized.
* *
* This gives you an opportunity to extend code. * This gives you an opportunity to extend code.
*/ */
register(/* { strapi }: { strapi: Core.Strapi } */) {}, register( { strapi }: { strapi: Core.Strapi } ) {
strapi.server.use(async (ctx, next) => {
if (ctx.req?.socket) {
(ctx.req.socket as any).encrypted = true;
}
await next();
});
},
/** /**
* An asynchronous bootstrap function that runs before * An asynchronous bootstrap function that runs before

View File

@@ -14,7 +14,8 @@
"noImplicitThis": true, "noImplicitThis": true,
"outDir": "dist", "outDir": "dist",
"rootDir": ".", "rootDir": ".",
"sourceMap": true "sourceMap": true,
"types": ["node", "react", "react-dom"]
}, },
"include": [ "include": [
// Include root files // Include root files