php - How to force Laravel Project to use HTTPS for all routes? - Stack Overflow

PHOTO EMBED

Thu Apr 07 2022 10:56:47 GMT+0000 (Coordinated Universal Time)

Saved by @oday #php

You can set 'url' => 'https://youDomain.com' in config/app.php or you could use a middleware class Laravel 5 - redirect to HTTPS.




OR...........


server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name example.com www.example.com;
    return 301 https://example.com$request_uri;
}
content_copyCOPY

https://stackoverflow.com/questions/35827062/how-to-force-laravel-project-to-use-https-for-all-routes