i'm using nuxt/axios with laravel as my backend. in my responses from laravel i send a custom header named _msg
but i cant access it. in my console.log(response)
i get only this:
but in my brower network i get the header:
how can i access it?
UPDATED
added this to my laravel middleware: this is an example if request is from manager and admin
<?php
namespace App\Http\Middleware;
use Closure;
use App\Traits\UtilsTrait;
class ManagerPlus
{
use UtilsTrait;
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
// return $next($request);
if($this->isMoreManager()){
$request->panelType = $this->addPanelType();
$response = $next($request);
$response->headers->set('Access-Control-Expose-Headers', 'Content-Disposition');
return $response;
}
return $this->permissionDenied();
}
}
UPDATE AFTER EXPOSE:
i did as told with my laravel/fruitcake setting and middleware and this is my new header that i get from axios. but still not getting my _msg