From within a controller, I have been using the method getSchemeAndHttpHost in order to build the url of another controller.
Everything has been running smoothly, until I needed to go over https. All urls that I get with the getSchemeAndHttpHost function are still http. Doing some troubleshooting, it came out that the getScheme function always returns http, both when I request the page with https and with http.
Did I miss something ?
How can I know if I am over http or https from my controller ?
Edit - some more information
- I made sure to run the tests with a valid certificate.
- If I run the isSecure method in my Request object, I always get false.
isSecure()method of the Request srevice returns false, can you test ?$request->isSecure(). - COil