Hi, I have been trying to run a server app on Vercel, following the template (https://github.com/vercel-support/express-vercel). This is the repo (https://github.com/i-atanasov/osogovo-run-api), and this is the project domain (https://osogovo-run-api.vercel.app/). I have tryed everything with the cors policies, the vercel.json config and guidelines like these (https://community.vercel.com/t/express-101-everything-about-deploying-your-express-app-on-vercel/4870) or these (https://community.vercel.com/t/debugging-404-errors/437). Still I am receiving cors errors when I try to reach it from the client locally and ot prod, and it only returns 404 when I hit it directly. Could you help me with what I am still missing?

Here is the vercel.json:
{ “rewrites”: [{ “source”: “/(.*)”, “destination”: “/api” }] }
Here is the api.index.ts:import express from 'express';import cors from 'cors';import 'dotenv/config';import { signUpHandler } from '../handlers/signUpHandler';const app = express();app.use(cors({origin: ["http://localhost:3000", "https://osogovorun.vercel.app/", "https://osogovo.run"]})); // Allow CORS from specific originsapp.use(express.json());app.get("/test-cors-get", function (req, res) {res.status(200).json({ success: true });});app.post("/test-cors-post", function (req, res) {res.status(200).json({ success: true });});app.get('/', (req, res) => {res.status(200).send('Welcome to the Osogovo Run API');});app.post('/register', signUpHandler.post);// Start the serverapp.listen(process.env.PORT || 4000, () => {console.log(`Server is running on port ${process.env.PORT || 4000}`);});