chore: skip secure headers in non-production envrionments
This commit is contained in:
parent
a0c959a375
commit
726bd5d06f
2 changed files with 7 additions and 3 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 4096,
|
||||
host: "0.0.0.0",
|
||||
port: 3000,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue