Answers for "CORSS oauth/token lavarel"

1

CORSS oauth/token lavarel

# In the path: 
ProjectName/app/Providers/AuthServiceProvider.php
#Change
Passport::routes();
#
Passport::routes(null,[
'prefix' => 'api/oauth',
'namespace' => '\Laravel\Passport\Http\Controllers',
]);
# for the client in my case Angular 12 set new headers from the request:
const httpHeaders = new HttpHeaders({
      'Access-Control-Allow-Origin': '*',
      'Content-Type':  'application/json',
      Accept:  'application/json',
    });
Posted by: Guest on April-05-2022

Browse Popular Code Answers by Language