Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel Access to HMLHttpRequest from origin has been blocked by CORS policy: No Access-Control-Allow-Origin

Route::group([
        'middleware' => ['api', 'cors'],
        'namespace' => $this->namespace,
        'prefix' => 'api',
    ], function ($router) {
         //Add you routes here, for example:
         Route::apiResource('/posts','PostController');
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #Access #HMLHttpRequest #origin #blocked #CORS #No
ADD COMMENT
Topic
Name
1+9 =