chore: skip secure headers in non-production envrionments

This commit is contained in:
Nicolas Meienberger 2026-01-28 22:15:11 +01:00
parent a0c959a375
commit 726bd5d06f
2 changed files with 7 additions and 3 deletions

View file

@ -37,12 +37,16 @@ export const scalarDescriptor = Scalar({
});
export const createApp = () => {
const app = new Hono().use(secureHeaders());
const app = new Hono();
if (config.trustedOrigins) {
app.use(cors({ origin: config.trustedOrigins }));
}
if (config.environment === "production") {
app.use(secureHeaders());
}
if (config.environment !== "test") {
app.use(honoLogger());
}

View file

@ -14,7 +14,7 @@ export default defineConfig({
},
},
server: {
host: '0.0.0.0',
port: 4096,
host: "0.0.0.0",
port: 3000,
},
});