Laravel 6 - Resource links prefixed with http instead of https

46 Views Asked by At

I created a simple User resource class, using artisan make:resource. I uploaded my website to a production environment, and changed the .env file accordingly, and APP_URL is now including https. But when I make an ajax request in order to get this resource (through a proper controller of course, and with data retrieved from the database), the links attached to it (meta, links) are prefixed with http. That's starting to make a trouble since ajax requests from https to http resulting blocked:mixed-content error in the browser. How can I force resource to return links prefixed with https? Why isn't it happens automatically?

0

There are 0 best solutions below