mercredi 5 septembre 2018

Force response()->download() return HTTPS url

I have switched my Laravel 5.1 to HTTPS and everything seems fine, except the file download part.

The problem is response()->download() returns a HTTP link instead of HTTPS and I get a mixed content in Chrome, so the link is blocked.

And some code:

$headers = array
            (
                'Content-Type' => 'application/vnd.android.package-archive'
            );
return response()->download(config('custom.storage') . $apk->generated_filename, $apk->filename, $headers);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire