Created
July 17, 2014 19:03
-
-
Save cfalzone/a3b16f1393318164c3d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rewrite Rule for Cross Domain Web Fonts | |
// This allows web fonts to be shared across hosts, primarily a cross-site security restriction in Firefox. | |
NormalRule rule = new NormalRule(); | |
rule.setName("CrossDomainWebFontsHeader"); | |
rule.setFrom("\\.(eot|ttf|otf|woff)"); | |
SetAttribute set = new SetAttribute(); | |
set.setType("response-header"); | |
set.setName("Access-Control-Allow-Origin"); | |
set.setValue("*"); | |
rule.addSetAttribute(set); | |
addRewriteRule(rule); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment