I downloaded ngrok so i can test my site for http and https requests (if someone is trying to get in my site specific url and it will be a simple http request, i will deny i
Request::secure()
relies on $_SERVER['HTTPS']
. As the HTTPS is being provided by the proxy, not your webserver, Laravel doesn't know it's being served as HTTPS.
ngrok does pass the X-Forwarded-Proto
header, but Laravel doesn't trust it by default. You can use the trusted proxy middleware to trust it.