Merge branch 'develop' into trunk
This commit is contained in:
commit
3d3edf50fa
2 changed files with 3 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class Authenticate extends Middleware
|
|||
// TODO: check this works
|
||||
if (Helper::isRequestForApiV1($request)) {
|
||||
// Use patched v1 Auth mecanism (without bearer reimplementation)
|
||||
$bearerToken = Helper::getBearerTokenFromRequest($request) ?? $request->api_token;
|
||||
$bearerToken = Helper::getBearerTokenFromRequest($request) ?? $request->api_token ?? '';
|
||||
$brand = Service::getFromBearerToken($bearerToken)->brand;
|
||||
$request->request->add(['brand_id' => $brand->id]);
|
||||
$response = $next($request);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
//! Important pourra etre retiré quand la V1 sera supprimé
|
||||
// empeche l'encapsulation dans data
|
||||
JsonResource::withoutWrapping();
|
||||
if (!in_array(config('app.env'), ['local', 'testing'])) {
|
||||
URL::forceScheme('https');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue