Skip to content

Commit 3df6768

Browse files
committed
Add ex. on allowing cross-origin resource timing
Provide example on how to set the `Timing-Allow-Origin` header in order to allow cross-origin access to the timing information for different resources. Ref: http://www.w3.org/TR/resource-timing/
1 parent 067b5ce commit 3df6768

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### HEAD
22

3-
* Add configs for files marked as `text/javascript`.
3+
* Add example on how to allow cross-origin access to the resource's
4+
timing information.
5+
* Add configs for files marked as `text/javascript`
46
[[db69327](https://github.com/h5bp/server-configs-apache/commit/db6932740a90a36cbbf8b38627fc034d595471c0)].
57
* Add configs for JSON Schema files (`.json`)
68
[[#39](https://github.com/h5bp/server-configs-apache/issues/39)].

dist/.htaccess

+17-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ##############################################################################
1111

1212
# ------------------------------------------------------------------------------
13-
# | Cross-domain requests |
13+
# | Cross-origin requests |
1414
# ------------------------------------------------------------------------------
1515

1616
# Allow cross-origin requests.
@@ -33,6 +33,22 @@
3333
</FilesMatch>
3434
</IfModule>
3535

36+
# ------------------------------------------------------------------------------
37+
# | Cross-origin resource timing |
38+
# ------------------------------------------------------------------------------
39+
40+
# Allow cross-origin access to the timing information for all resources.
41+
42+
# If a resource isn't served with a `Timing-Allow-Origin` header that would
43+
# allow its timing information to be shared with the current document, some of
44+
# the attributes of the `PerformanceResourceTiming` object will be set to zero.
45+
46+
# http://www.w3.org/TR/resource-timing/
47+
48+
# <IfModule mod_headers.c>
49+
# Header set Timing-Allow-Origin: "*"
50+
# </IfModule>
51+
3652
# ------------------------------------------------------------------------------
3753
# | CORS-enabled images |
3854
# ------------------------------------------------------------------------------

test/fixtures/.htaccess

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# ##############################################################################
77

88
# ------------------------------------------------------------------------------
9-
# | Cross-domain requests |
9+
# | Cross-origin requests |
1010
# ------------------------------------------------------------------------------
1111

1212
<IfModule mod_headers.c>

0 commit comments

Comments
 (0)