Issue with Laravel 5.2 and His non-persistent App SetLocale over http://
Asked Answered
R

1

-1

Can anyone point me in the right direction when trying to troubleshoot this web app (Dorothea Special School) I created a few years back using this link Laravel 5 And His F*cking non-persistent App SetLocale

If I can recall it was working perfectly when I 1st published the web app, but for a while now it doesn't seem to be working correctly... I think I did check the log file on the server and a couple more things to no avail. Do you think I need to run a composer cmd on the server?

Receiver answered 19/11, 2018 at 10:43 Comment(7)
Things to try: App::setLocale('nl_NL'); and on server level apt-get install locales-allReceiptor
Hi Thomas Moors thanks I just noticed now that if I use https://... instead of http://... it seems to be working 100%, so would your comment above still apply?Receiver
No I think not, this probably has to do with your session cookie only be set trough https. In config/session.php you have an option called secure (line 164 on my installation) which you might want to set to false.Receiptor
imgur.com/ukJGT8GReceiptor
@Thomas Moors great thanks, but if I set it to false will it work correctly for http://... and https://... or only http://... then? If it's only going to work for http://... then it's kind of a catch 22. Wouldn't it be better / easier to rather redirect all http://... to https://... then? What are your thoughts?Receiver
yes https only would be bestReceiptor
Thanks very much for all the help :-). You must add all your comments as an answer when you have time then I can mark your answer as the correct one.Receiver
R
1

You have 2 options: only allow https through redirecting http or disabling secure for cookies in your config.

Receiptor answered 19/11, 2018 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.