2,839 questions
1929 votes
30 answers
1.3m views
How do we control web page caching, across all browsers?
Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner. For security reasons we do not want certain pages in our application to be cached, ever, ...
1767 votes
40 answers
1.7m views
Android 8: Cleartext HTTP traffic not permitted
I had reports from users with Android 8 that my app (that uses back-end feed) does not show content. After investigation I found following Exception happening on Android 8: 08-29 12:03:11.246 11285-...
647 votes
38 answers
2.4m views
Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?
Edit : I tried to format the question and accepted answer in more presentable way at my blog. Here is the original issue. I am getting this error: detailed message sun.security.validator....
435 votes
22 answers
859k views
Trusting all certificates using HttpClient over HTTPS
Recently posted a question regarding the HttpClient over Https (found here). I've made some headway, but I've run into new issues. As with my last problem, I can't seem to find an example anywhere ...
334 votes
14 answers
642k views
htaccess redirect to https://www
I have the following htaccess code: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond !{HTTPS} off RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{...
481 votes
14 answers
134k views
Is it valid to replace http:// with // in a <script src="http://...">?
I have the following element: <script type="text/javascript" src="https://cdn.example.com/js_file.js"></script> In this case the site is HTTPS, but the site may also be just HTTP. (The JS ...
271 votes
19 answers
505k views
Accept server's self-signed ssl certificate in Java client
It looks like a standard question, but I couldn't find clear directions anywhere. I have java code trying to connect to a server with probably self-signed (or expired) certificate. The code reports ...
341 votes
29 answers
736k views
How to redirect all HTTP requests to HTTPS using .htaccess rules?
I'm trying to redirect all insecure HTTP requests on my site (e.g. http://www.example.com) to HTTPS (https://www.example.com). How can I do this in .htaccess file? By the way, I'm using PHP.
409 votes
30 answers
1.6m views
Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have a class that will download a file from a https server. When I run it, it returns a lot of errors. It seems that I have a problem with my certificate. Is it possible to ignore the client-server ...
120 votes
11 answers
360k views
How to get file_get_contents() to work with HTTPS?
I'm working on setting up credit card processing and needed to use a workaround for CURL. The following code worked fine when I was using the test server (which wasn't calling an SSL URL), but now ...
246 votes
7 answers
70k views
Can I change all my http:// links to just //?
Dave Ward says, It’s not exactly light reading, but section 4.2 of RFC 3986 provides for fully qualified URLs that omit protocol (the HTTP or HTTPS) altogether. When a URL’s protocol is omitted, the ...
444 votes
9 answers
140k views
Is a HTTPS query string secure?
I am creating a secure web based API that uses HTTPS; however, if I allow the users to configure it (include sending password) using a query string will this also be secure or should I force it to be ...
307 votes
13 answers
276k views
How to use NSURLConnection to connect with SSL for an untrusted cert?
I have the following simple code to connect to a SSL webpage NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:url]; [ NSURLConnection sendSynchronousRequest: urlRequest ...
1343 votes
14 answers
435k views
Are HTTPS URLs encrypted?
Are all URLs encrypted when using TLS/SSL (HTTPS) encryption? I would like to know because I want all URL data to be hidden when using TLS/SSL (HTTPS). If TLS/SSL gives you total URL encryption then ...
647 votes
10 answers
707k views
Enabling HTTPS on express.js
I'm trying to get HTTPS working on express.js for node, and I can't figure it out. This is my app.js code. var express = require('express'); var fs = require('fs'); var privateKey = fs.readFileSync('...