[packages/lighttpd] Add sample CORS header for font requests

glen glen at pld-linux.org
Thu Feb 19 22:05:40 CET 2015


commit 5221b95cd55d5c2c474afa33ac0134f97ceb7344
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Feb 19 23:03:08 2015 +0200

    Add sample CORS header for font requests

 lighttpd-mod_setenv.conf | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/lighttpd-mod_setenv.conf b/lighttpd-mod_setenv.conf
index 5b91dad..68763d9 100644
--- a/lighttpd-mod_setenv.conf
+++ b/lighttpd-mod_setenv.conf
@@ -9,3 +9,11 @@ server.modules += (
 #### setenv
 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+# Add CORS header for font requests
+# http://davidwalsh.name/cdn-fonts
+#$HTTP["url"] =~ "\.(?:eot|ttf|otf|woff)$" {
+#	setenv.add-response-header += (
+#		"Access-Control-Allow-Origin" => "*",
+#	)
+#}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lighttpd.git/commitdiff/c5f94c38cc7e75e1f25092341e79df2f79d0783a



More information about the pld-cvs-commit mailing list