Level 122
look in the error logs for the reason for the 500 error. It can be due to many things on a new install.
i have a react(frontend) laravel(backend) app. I deployed it to free hosting(infinityfree). pages like contact us, FAQ, terms and about us which don't bring data from the backend, load well without problems while the ones which have contact with the backend throw 500 internal server error. on developement mode everything works fine without 500 internal server error. Has it something to do with the free hosting? How can I solve that? here's my code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="react project" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%manifest.json" />
<title>project</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
config/cors
<?php
return [
'paths' => ['api/*','sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => [env('FRONTEND_URL', 'http://localhost:3000')],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => true,
];
on .env
APP_URL=http://project.iblogger.org
FRONTEND_URL=http://project.iblogger.org
Please or to participate in this conversation.