.
This commit is contained in:
@@ -43,6 +43,7 @@ export const assertAllowedOrigin = (request: Request): void => {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(config.appOrigins, origin)
|
||||
if (!config.appOrigins.includes(origin.toLowerCase())) {
|
||||
throw new HttpError(403, "Origin is not allowed.");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
const path = require("node:path");
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "internal-mailserver",
|
||||
cwd: path.join(__dirname, "apps/api"),
|
||||
script: "bun",
|
||||
args: "--env-file ../../.env dist/index.js",
|
||||
interpreter: "none",
|
||||
exec_mode: "fork",
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
time: true,
|
||||
max_memory_restart: "512M",
|
||||
env: {
|
||||
NODE_ENV: "production"
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -5,7 +5,7 @@ server {
|
||||
client_max_body_size 2m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_pass http://127.0.0.1:16731;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user