Compare commits
2 Commits
c2a32f11b8
...
ce37fafddf
| Author | SHA1 | Date | |
|---|---|---|---|
| ce37fafddf | |||
| 04c4f7839f |
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$HOME/.nvm/nvm.sh"
|
||||
node scripts/check-version.js
|
||||
#. "$HOME/.nvm/nvm.sh"
|
||||
#node scripts/check-version.js
|
||||
@@ -1,55 +1,21 @@
|
||||
export default [
|
||||
"strapi::logger",
|
||||
"strapi::errors",
|
||||
//'strapi::security',
|
||||
{
|
||||
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::security",
|
||||
"strapi::cors",
|
||||
"strapi::poweredBy",
|
||||
"strapi::query",
|
||||
"strapi::body",
|
||||
{
|
||||
name: 'strapi::session',
|
||||
name: "strapi::session",
|
||||
config: {
|
||||
cookie: {
|
||||
secure: true, // Force car tu es sur https://back.harmonylab.ovh
|
||||
sameSite: 'lax',
|
||||
// Nom unique pour être sûr que le navigateur ne garde pas un vieux cookie
|
||||
key: "strapi_session_local_debug",
|
||||
maxAge: 86400000,
|
||||
httpOnly: true,
|
||||
},
|
||||
// FORCE à false pour que ça marche en HTTP local
|
||||
secure: false,
|
||||
sameSite: "lax",
|
||||
},
|
||||
},
|
||||
"strapi::favicon",
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
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"),
|
||||
port: env.int("PORT", 1337),
|
||||
proxy: true,
|
||||
url: env('STRAPI_URL'),
|
||||
url: env("STRAPI_URL", "http://localhost:1337"),
|
||||
app: {
|
||||
keys: env.array("APP_KEYS"),
|
||||
// ON FORCE UN TABLEAU EN DUR ICI :
|
||||
keys: [
|
||||
"UneSuperClefSecreteTresLongueEtAleatoire123",
|
||||
"UneAutreClefDeSecours456",
|
||||
],
|
||||
},
|
||||
cron: {
|
||||
enabled: true,
|
||||
tasks: cronTasks,
|
||||
},
|
||||
proxy: false,
|
||||
admin: {
|
||||
auth: {
|
||||
events: {
|
||||
onConnectionSuccess(e) {
|
||||
console.log('Login success for:', e.user.email);
|
||||
secret: env("ADMIN_JWT_SECRET"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
11281
package-lock.json
generated
11281
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "harmony-back",
|
||||
"version": "0.13.1",
|
||||
"version": "0.13.2",
|
||||
"private": true,
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
@@ -29,6 +29,7 @@
|
||||
"styled-components": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/minimatch": "^6.0.0",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
10
src/index.ts
10
src/index.ts
@@ -1,13 +1,21 @@
|
||||
import type { Core } from "@strapi/strapi";
|
||||
|
||||
export default {
|
||||
|
||||
/**
|
||||
* An asynchronous register function that runs before
|
||||
* your application is initialized.
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
"noImplicitThis": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": ".",
|
||||
"sourceMap": true
|
||||
"sourceMap": true,
|
||||
"types": ["node", "react", "react-dom"]
|
||||
},
|
||||
"include": [
|
||||
// Include root files
|
||||
|
||||
Reference in New Issue
Block a user