Inside the controller, I used the getSchemeAndHttpHost method to create the URL of another controller.
Everything works smoothly until I need to switch to https. All the URLs that I get with the getSchemeAndHttpHost function are still http. When troubleshooting, it turned out that the getScheme function always returns http, both when requesting a page using https or with http.
Did I miss something?
How can I find out if I went through http or https from my controller?
Edit - Additional Information
- I checked the tests with a valid certificate.
- If I run the isSecure method in the Request object, I always get false.
source
share