@@ -36,17 +36,21 @@ defmodule ComponentsGuideWeb.LatencyComparisonLive do
36
36
37
37
def get_headers_of_interest ( % Fetch.Response { } = response ) do
38
38
h = response . headers
39
+ location = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "location" end )
39
40
content_length = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "content-length" end )
40
41
content_encoding = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "content_encoding" end )
41
42
transfer_encoding = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "transfer-encoding" end )
42
43
cache_control = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "cache-control" end )
43
- location = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "location" end )
44
+ server = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "server" end )
45
+ cf_ray = Enum . find ( h , fn { key , _ } -> String . downcase ( key ) == "cf-ray" end )
44
46
inspect ( [
47
+ location ,
45
48
content_length ,
46
49
content_encoding ,
47
50
transfer_encoding ,
48
51
cache_control ,
49
- location
52
+ server ,
53
+ cf_ray
50
54
] |> Enum . filter ( fn v -> v != nil end ) )
51
55
end
52
56
end
@@ -59,6 +63,7 @@ defmodule ComponentsGuideWeb.LatencyComparisonLive do
59
63
< li > < . link href = "/latency-comparison/cdns " > CDNs</ . link > </ li >
60
64
< li > < . link href = "/latency-comparison/dev-blogs " > Dev Blogs</ . link > </ li >
61
65
< li > < . link href = "/latency-comparison/robots.txt " > Robots.txt</ . link > </ li >
66
+ < li > < . link href = "/latency-comparison/edge " > Edge</ . link > </ li >
62
67
</ ul >
63
68
</ nav >
64
69
< . form
0 commit comments