im having problem with vercel deploy that returns status code 200 on errors,
for ex. Flight::json(["message" => "Authorization is missing"], 403);
will return {"message": "Authorization is missing"} with code 200. I think problem is that vercel has content type of text, and ignores error code sent. This is my vercel.json but it does not work, how can I get correct error codes btw on localhost everything works as itended.
{
"functions": {
"api/*.php": {
"runtime": "[email protected]"
}
},
"routes": [
{
"src": "/(.*)",
"dest": "/api/index.php",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
"headers": {
"Access-Control-Allow-Origin": "https://keytrack-edu-front.vercel.app",
"Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
"Content-Type": "application/json"
}
}
]
}