JohnnyW2001
1 week ago
106
5
Laravel

Why is asset() not secure?

Posted 1 week ago by JohnnyW2001

According to Laravel's documentation: "The asset function generates a URL for an asset using the current scheme of the request (HTTP or HTTPS)"

https://laravel.com/docs/master/helpers#method-asset

I have a website hosted at https:// but Laravel is still generating http:// when I used asset(). I don't want to have to force HTTPS through forceScheme or anything, as I've never had to do this before with Laravel and https:// connections. The documentation states it will use the "current scheme".

Please sign in or create an account to participate in this conversation.