Is there a way to track SSL traffic vs. non-SSL traffic?


Setting up remote log streaming will help you better analyze the data. Take a look at our help document to get you started:

We determine if a request is SSL or not by the presence of a variable http.Fastly-SSL. One option is to create a header and add a condition similar to the following:

  if (req.http.Fastly-SSL) {
     set resp.http.X-Is-SSL = "yes";

Then add this header to your log format.

Another option using remote log streaming would be to create two logging endpoints. Add a condition to one logging endpoint to capture SSL traffic (req.http.Fastly-SSL). Add a condition to the other logging endpoint to capture non-SSL traffic (! req.http.Fastly-SSL).


Hello Team,
I have seen this tips is quite old (3 years). Is it still the best way to know if request is done over http or https ? (check req.http.Fastly-SSL and set up an http header).


Hello again,
Seems possible to directly use req.http.Fastly-SSL in the log format.
Cf : Debugging with logs