Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

CORSS oauth/token lavarel

# In the path: 
ProjectName/app/Providers/AuthServiceProvider.php
#Change
Passport::routes();
#
Passport::routes(null,[
'prefix' => 'api/oauth',
'namespace' => 'LaravelPassportHttpControllers',
]);
# 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',
    });
 
PREVIOUS NEXT
Tagged: #CORSS #lavarel
ADD COMMENT
Topic
Name
4+5 =