I am new to Laravel and AWS as well. I have a new Laravel application which is behind an AWS ELB listening on https to client side and http to EC2 instance but when trying to access api routes, it is being blocked due to mixed content.
I have modified my Middleware trusted proxy as seen below
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array|string
*/
protected $proxies = '*';
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_AWS_ELB;
}
However everything in web route works but not in api routes. Please suggestions. Thanks