1
I’m using the library Laravelcors and would like to block all requisites except a specific Dominio, as I do this?
1
I’m using the library Laravelcors and would like to block all requisites except a specific Dominio, as I do this?
1
If the entire facility was followed barryvdh/Laravel-Cors goes in the briefcase config
and open the file cors.php
and in the array
settings, add address in key allowedOrigins
as now is in the example below the address http://www.teste.com
, there can also contain other addresses, because, accepts more settings.
return [
/*
|--------------------------------------------------------------------------
| Laravel CORS
|--------------------------------------------------------------------------
|
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
| to accept any value.
|
*/
'supportsCredentials' => false,
'allowedOrigins' => ['http://www.teste.com'],
'allowedHeaders' => ['Content-Type', 'X-Requested-With'],
'allowedMethods' => ['*'], // ex: ['GET', 'POST', 'PUT', 'DELETE']
'exposedHeaders' => [],
'maxAge' => 0,
]
Browser other questions tagged php laravel rest cors
You are not signed in. Login or sign up in order to post.
I had thought to do this, but I mentioned having a safer position... young vlw. :)
– Diego Ananias