Skip to content

Commit

Permalink
Merge pull request #43 from andreciornavei/develop
Browse files Browse the repository at this point in the history
add localhost cookie domain
  • Loading branch information
andreciornavei authored Mar 7, 2024
2 parents 6652499 + 652baa4 commit 58d2333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/app/Http/Controllers/AuthLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function handler(Request $request)
$response = new Response(json_encode(auth()->user()));
return $response
->withHeaders(['Cache-Control' => 'no-cache, private'])
->withCookie(cookie("Authorization", $token, time() + 300, null, null, false, true, false, "none"));
->withCookie(cookie("Authorization", $token, 60, null, "localhost", false, true, false, "none"));
} catch (Exception $error) {
return response()->json(json_decode($error->getMessage()), 401);
}
Expand Down
2 changes: 1 addition & 1 deletion backend/config/cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

'allowed_methods' => ['*'],

'allowed_origins' => ['http://localhost:3000', "https://bnb-bank.andreciornavei.com.br"],
'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

Expand Down

0 comments on commit 58d2333

Please sign in to comment.