@@ -124,12 +124,14 @@ <h2>Dependencies</h2>
124
124
< ul >
125
125
< li > < dfn data-cite ="!FETCH#concept-request-client "> client</ dfn > </ li >
126
126
< li > < dfn data-cite ="!FETCH#cors-preflight-request "> CORS-preflight request</ dfn > </ li >
127
+ < li > < dfn data-cite ="!FETCH#determine-the-network-partition-key "> determine the network partition key</ dfn > </ li >
127
128
< li > < dfn data-cite ="!FETCH#extract-header-list-values "> extract header list values</ dfn > </ li >
128
129
< li > < dfn data-cite ="!FETCH#header-list-contains "> header list contains</ dfn > </ li >
129
130
< li > < dfn data-cite ="!FETCH#concept-header-name " data-lt ="header names "> header name</ dfn > </ li >
130
131
< li > < dfn data-cite ="!FETCH#concept-header-value "> header value</ dfn > </ li >
131
132
< li > < dfn data-cite ="!FETCH#http-network-fetch "> HTTP-network fetch</ dfn > </ li >
132
133
< li > < dfn data-cite ="!FETCH#http-network-or-cache-fetch "> HTTP-network-or-cache fetch</ dfn > </ li >
134
+ < li > < dfn data-cite ="!FETCH#network-partition-key "> network partition key</ dfn > </ li >
133
135
< li > < dfn data-cite ="!FETCH#redirect-status " data-lt ="redirects "> redirect status</ dfn > </ li >
134
136
< li > < dfn data-cite ="!FETCH#concept-request-header-list "> request header list</ dfn > </ li >
135
137
< li > < dfn data-cite ="!FETCH#concept-response " data-lt ="responses "> response</ dfn > </ li >
@@ -490,7 +492,7 @@ <h2>Policy cache</h2>
490
492
< p >
491
493
A conformant user agent MUST provide a < dfn > policy cache</ dfn > , which is a
492
494
storage mechanism that maintains a set of < a > NEL policies</ a > , keyed by
493
- their < a data-lt =" policy origin " > origins < /a > .
495
+ ( < a > network partition key </ a > , < a > origin < /a > ) tuples .
494
496
</ p >
495
497
496
498
< p >
@@ -501,7 +503,8 @@ <h2>Policy cache</h2>
501
503
502
504
< ul >
503
505
< li > Insert, update, and delete < a > NEL policies</ a > .</ li >
504
- < li > Retrieve the < a > NEL policy</ a > , if any, for an < a > origin</ a > .</ li >
506
+ < li > Retrieve the < a > NEL policy</ a > , if any, for a given < a > origin</ a >
507
+ and < a > network partition key</ a > .</ li >
505
508
< li > Clear the cache.</ li >
506
509
</ ul >
507
510
</ section >
@@ -699,6 +702,11 @@ <h2>Process policy headers</h2>
699
702
Let < var > origin</ var > be < var > request</ var > 's < a > origin</ a > .
700
703
</ li >
701
704
705
+ < li >
706
+ Let < var > key</ var > be the result of calling < a > determine the network
707
+ partition key</ a > , given < var > request</ var > .
708
+ </ li >
709
+
702
710
< li >
703
711
Let < var > header</ var > be the value of the < a > response header</ a > whose
704
712
name is < code > NEL</ code > .
@@ -818,9 +826,9 @@ <h2>Process policy headers</h2>
818
826
819
827
< li >
820
828
If there is already an entry in the < a > policy cache</ a > for
821
- < var > origin </ var > , replace it with < var > policy </ var > ; otherwise,
822
- insert < var > policy</ var > into the < a > policy cache </ a > for
823
- < var > origin</ var > .
829
+ ( < var > key </ var > , < var > origin </ var > ), replace it with
830
+ < var > policy</ var > ; otherwise, insert < var > policy</ var > into the
831
+ < a > policy cache </ a > for ( < var > key </ var > , < var > origin</ var > ) .
824
832
</ li >
825
833
826
834
</ ol >
@@ -831,18 +839,28 @@ <h2>Process policy headers</h2>
831
839
< h2 > Report delivery</ h2 >
832
840
833
841
< section >
834
- < h2 > Choose a policy for an origin </ h2 >
842
+ < h2 > Choose a policy for a request </ h2 >
835
843
836
844
< p >
837
- Given an < a > origin </ a > (< var > origin </ var > ), this algorithm determines
838
- which < a > NEL policy</ a > in the < a > policy cache</ a > should be used to
839
- generate reports for < a > network requests </ a > to < var > origin </ var > .
845
+ Given a < a > network request </ a > (< var > request </ var > ), this algorithm
846
+ determines which < a > NEL policy</ a > in the < a > policy cache</ a > should be
847
+ used to generate reports for that < a > network request </ a > .
840
848
</ p >
841
849
842
850
< ol class ="algorithm ">
843
851
844
852
< li >
845
- If there is an entry in the < a > policy cache</ a > for < var > origin</ var > :
853
+ Let < var > origin</ var > be < var > request</ var > 's < a > origin</ a > .
854
+ </ li >
855
+
856
+ < li >
857
+ Let < var > key</ var > be the result of calling < a > determine the network
858
+ partition key</ a > , given < var > request</ var > .
859
+ </ li >
860
+
861
+ < li >
862
+ If there is an entry in the < a > policy cache</ a > for (< var > key</ var > ,
863
+ < var > origin</ var > ):
846
864
< ol >
847
865
< li > Let < var > policy</ var > be that entry.</ li >
848
866
< li > If < var > policy</ var > is not < a > expired</ a > , return it.</ li >
@@ -855,8 +873,8 @@ <h2>Choose a policy for an origin</h2>
855
873
856
874
< ol >
857
875
< li >
858
- If there is an entry in the < a > policy cache</ a > for < var > parent
859
- origin</ var > :
876
+ If there is an entry in the < a > policy cache</ a > for
877
+ ( < var > key </ var > , < var > parent origin</ var > ) :
860
878
< ol >
861
879
< li > Let < var > policy</ var > be that entry.</ li >
862
880
< li >
@@ -1021,7 +1039,7 @@ <h2>Extract response headers</h2>
1021
1039
1022
1040
< li >
1023
1041
Let < var > policy</ var > be the result of executing < a
1024
- href ="#choose-a-policy-for-an-origin "> </ a > on < var > origin </ var > . If
1042
+ href ="#choose-a-policy-for-a-request "> </ a > on < var > request </ var > . If
1025
1043
< var > policy</ var > is < code > no policy</ code > , return null.
1026
1044
</ li >
1027
1045
@@ -1897,6 +1915,13 @@ <h2>Privacy Considerations</h2>
1897
1915
persistent tracker.
1898
1916
</ p >
1899
1917
1918
+ < p >
1919
+ Additionally, the NEL < a > policy cache</ a > is partitioned using the
1920
+ < a > network partition key</ a > , so that a < a > NEL policy</ a > stored for a
1921
+ site in one embedding context will not be used in a different context
1922
+ (for instance, when embedded by a different top-level site.)
1923
+ </ p >
1924
+
1900
1925
< p >
1901
1926
NEL is intended to augment existing server-side monitoring. NEL reports
1902
1927
should only be sent to the owner of the service being requested. For
0 commit comments