Reputation: 33
I need help making a redirect. I am working on a project that the front-end reactjs and the back-end laravel are in different domains. The system has file registration and they are stored in the spaces of the digital ocean. When the system returns the file url, the returned url is concatenating the front-end base url with the file url in spaces, example:
http://localhost:8000/http://localhost:3000
In web routes:
Route::any('/', function () {
header('Location: ' . env('APP_FRONTEND_URL'));
die;
});
How to fix redirects?
Upvotes: 1
Views: 2524