Add trust proxy configuration and job ID validation

Adds `app.set('trust proxy', 1)` to `app.ts` for correct IP rate limiting and implements Zod validation for the `:id` parameter in the `GET /jobs/:id` route within `jobs.ts`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 418bf6f8-212b-4bb0-a7a5-8231a061da4e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7049b42e-1d56-48f8-bf54-25cef7c7880b
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
alexpaynex
2026-03-18 15:34:05 +00:00
parent 4e8adbcb93
commit f3de9e9ab0
2 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,8 @@ import router from "./routes";
const app: Express = express();
app.set("trust proxy", 1);
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));