I'm coding a file exchange and some files shouldnt be downloaded without ssl. So I need to check if a connection is ssl encoded or not. Does this depend to the webserver or is there any method for all webservers?
Enter the URL you wish to check in the browser. Right-click the page or select the Page drop-down menu, and select Properties. In the new window, look for the Connection section. This will describe the version of TLS or SSL used.
Run this in the session you want to verify: SELECT * FROM performance_schema. session_status WHERE VARIABLE_NAME IN ('Ssl_version','Ssl_cipher'); If you get the cipher and version strings, then the connection is encrypted.
Look in your browser's top address bar for "https://" at the beginning of the website's address. The URLs of unencrypted websites begin with "http://" or you may not see that part of the address at all, depending on your browser.
You should be able to check request.ssl?
to determine this.
As far as I can tell this is essentially just testing against request.proto
to see if it is "https://"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With