Compare commits
2 Commits
c2a32f11b8
...
ce37fafddf
| Author | SHA1 | Date | |
|---|---|---|---|
| ce37fafddf | |||
| 04c4f7839f |
@@ -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
|
||||||
@@ -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",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,24 +1,33 @@
|
|||||||
import cronTasks from "./cron-tasks";
|
import cronTasks from "./cron-tasks";
|
||||||
|
|
||||||
export default ({ env }) => ({
|
export default ({ env }) => {
|
||||||
host: env("HOST", "0.0.0.0"),
|
// DEBUG: On vérifie ce que Strapi reçoit vraiment
|
||||||
port: env.int("PORT", 1337),
|
const appKeys = env.array("APP_KEYS");
|
||||||
proxy: true,
|
console.log("------------------------------------------------");
|
||||||
url: env('STRAPI_URL'),
|
console.log("Key Check:", appKeys.length > 0 ? "CHARGÉES ✅" : "VIDES ❌");
|
||||||
app: {
|
console.log("Key Type:", typeof appKeys[0]); // Doit afficher 'string'
|
||||||
keys: env.array("APP_KEYS"),
|
console.log("Host:", env("HOST", "0.0.0.0"));
|
||||||
},
|
console.log("------------------------------------------------");
|
||||||
cron: {
|
return {
|
||||||
enabled: true,
|
host: env("HOST", "0.0.0.0"),
|
||||||
tasks: cronTasks,
|
port: env.int("PORT", 1337),
|
||||||
},
|
url: env("STRAPI_URL", "http://localhost:1337"),
|
||||||
admin: {
|
app: {
|
||||||
auth: {
|
// ON FORCE UN TABLEAU EN DUR ICI :
|
||||||
events: {
|
keys: [
|
||||||
onConnectionSuccess(e) {
|
"UneSuperClefSecreteTresLongueEtAleatoire123",
|
||||||
console.log('Login success for:', e.user.email);
|
"UneAutreClefDeSecours456",
|
||||||
},
|
],
|
||||||
|
},
|
||||||
|
cron: {
|
||||||
|
enabled: true,
|
||||||
|
tasks: cronTasks,
|
||||||
|
},
|
||||||
|
proxy: false,
|
||||||
|
admin: {
|
||||||
|
auth: {
|
||||||
|
secret: env("ADMIN_JWT_SECRET"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
});
|
};
|
||||||
|
|||||||
11285
package-lock.json
generated
11285
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||||
|
|||||||
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";
|
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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user