Skip to content

Commit

Permalink
Add ex. on allowing cross-origin resource timing
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
alrra committed Sep 9, 2014
1 parent 067b5ce commit 3df6768
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,8 @@
### HEAD

* Add configs for files marked as `text/javascript`.
* Add example on how to allow cross-origin access to the resource's
timing information.
* Add configs for files marked as `text/javascript`
[[db69327](https://github.com/h5bp/server-configs-apache/commit/db6932740a90a36cbbf8b38627fc034d595471c0)].
* Add configs for JSON Schema files (`.json`)
[[#39](https://github.com/h5bp/server-configs-apache/issues/39)].
Expand Down
18 changes: 17 additions & 1 deletion dist/.htaccess
Expand Up @@ -10,7 +10,7 @@
# ##############################################################################

# ------------------------------------------------------------------------------
# | Cross-domain requests |
# | Cross-origin requests |
# ------------------------------------------------------------------------------

# Allow cross-origin requests.
Expand All @@ -33,6 +33,22 @@
</FilesMatch>
</IfModule>

# ------------------------------------------------------------------------------
# | Cross-origin resource timing |
# ------------------------------------------------------------------------------

# Allow cross-origin access to the timing information for all resources.

# If a resource isn't served with a `Timing-Allow-Origin` header that would
# allow its timing information to be shared with the current document, some of
# the attributes of the `PerformanceResourceTiming` object will be set to zero.

# http://www.w3.org/TR/resource-timing/

# <IfModule mod_headers.c>
# Header set Timing-Allow-Origin: "*"
# </IfModule>

# ------------------------------------------------------------------------------
# | CORS-enabled images |
# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/.htaccess
Expand Up @@ -6,7 +6,7 @@
# ##############################################################################

# ------------------------------------------------------------------------------
# | Cross-domain requests |
# | Cross-origin requests |
# ------------------------------------------------------------------------------

<IfModule mod_headers.c>
Expand Down

0 comments on commit 3df6768

Please sign in to comment.