There is no automatic follow protocol, http is used under https, how to solve it #602
There is no automatic follow protocol, http is used under https, how to solve it
A new laravel project, using jetstream, was finally deployed on a fully connected https website, causing problems caused by referencing http://
@routes
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
@inertiaHead
How does this part generate the URL? Why does it not automatically follow the protocol?
In your ENV file, does the APP_URL start with https:// ?
@gych When I click to log in and register, I will see an error.
@wending So after you've modified the APP_URL to use https:// try to run php artisan config:clear
@gych doesn’t help, I don’t have caching either
@gych in the bootstrap/app.php
need add *.
// Prevent ziggy route() from being unable to generate https problems, at: '*',
$middleware->trustProxies(
at: '*',
headers: Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB
);
thankyou
Please or to participate in this conversation.