Skip to content

Commit 292d6d7

Browse files
author
Gareth Redfern
committed
craete a SPA_URL env variable
1 parent 6962359 commit 292d6d7

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
5050

5151
SANCTUM_STATEFUL_DOMAINS=localhost:8080
5252
SESSION_DOMAIN=localhost
53+
SPA_URL=http://localhost:8080

app/Http/Middleware/Authenticate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Authenticate extends Middleware
1515
protected function redirectTo($request)
1616
{
1717
if (! $request->expectsJson()) {
18-
return url('http://localhost:8080/login');
18+
return url(env('SPA_URL') . '/login');
1919
}
2020
}
2121
}

app/Providers/AuthServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function boot()
2727
$this->registerPolicies();
2828

2929
ResetPassword::createUrlUsing(function ($user, string $token) {
30-
return 'http://localhost:8080/reset-password?token=' .$token;
30+
return env('SPA_URL') . '/reset-password?token=' . $token;
3131
});
3232
}
3333
}

config/fortify.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
|
6262
*/
6363

64-
'home' => 'http://localhost:8080/dashboard',
64+
'home' => env('SPA_URL') . '/dashboard',
6565

6666
/*
6767
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)