Skip to content

Commit

Permalink
fixing headers for apache/nginx to make fonts work properly in FF/IE …
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ene committed Nov 8, 2013
1 parent 2e89179 commit 065b8ad
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
48 changes: 27 additions & 21 deletions localhost-setup/apache2/httpd-vhosts.conf
Expand Up @@ -25,29 +25,35 @@ NameVirtualHost *:80
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerName template.invtr.co
DocumentRoot /Library/WebServer/Documents/sites/template/public
ErrorLog /var/log/apache2/template/error_log
CustomLog /var/log/apache2/template/access_log combined
<Directory /Library/WebServer/Documents/sites/*>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerName template.invtr.co
DocumentRoot /Library/WebServer/Documents/sites/template/public
ErrorLog /var/log/apache2/template/error_log
CustomLog /var/log/apache2/template/access_log combined
<Directory /Library/WebServer/Documents/sites/*>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<FilesMatch ".(ttf|otf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</VirtualHost>

<VirtualHost *:80>
ServerName invtr.co
ServerAlias www.invtr.co
DocumentRoot /Library/WebServer/Documents/sites/invtr.co/public
ErrorLog /var/log/apache2/public/error_log
CustomLog /var/log/apache2/public/access_log combined
<Directory /Library/WebServer/Documents/sites/*>
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerName invtr.co
ServerAlias www.invtr.co
DocumentRoot /Library/WebServer/Documents/sites/invtr.co/public
ErrorLog /var/log/apache2/public/error_log
CustomLog /var/log/apache2/public/access_log combined
<Directory /Library/WebServer/Documents/sites/*>
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<FilesMatch ".(ttf|otf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</VirtualHost>

12 changes: 11 additions & 1 deletion localhost-setup/nginx/nginx.conf
Expand Up @@ -88,6 +88,10 @@ http {
# proxy_pass http://127.0.0.1:3000;
proxy_pass http://localhost:20559;
}

location ~* .(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
}

# another virtual host using mix of IP-, name-, and port-based configuration
Expand All @@ -108,6 +112,9 @@ http {
# proxy_pass http://127.0.0.1:3000;
proxy_pass http://localhost:20559;
}
location ~* .(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
}


Expand Down Expand Up @@ -139,6 +146,9 @@ http {
proxy_redirect off;
# proxy_pass http://127.0.0.1:3000;
proxy_pass http://localhost:20559;
}
}
location ~* .(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
}
}

0 comments on commit 065b8ad

Please sign in to comment.