WebFaction
Community site: login faq

All my static files are being served fine, except the following two fonts files:

fontawesome-webfont.woff
fontawesome-webfont.ttf

I'm guessing it has something to do with this files in particular as google fonts and all the other necessary static images and stylesheets are being loaded fine.

It's being served from a subdomain from my domain, ie: static.mydomain.com.

I've tried adding all of the following in my httpd.conf and had no joy:

LoadModule headers_module    modules/mod_headers.so
LoadModule rewrite_module    modules/mod_rewrite.so

# Check MIME types are cool
AddType application/x-font-ttf           ttc ttf
AddType application/font-woff            woff

Header always set Access-Control-Allow-Origin 'http://static.mydomain.com'                                                                  
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.                          
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]

Any advice would be appreciated.

asked 24 Nov, 16:48

elequ's gravatar image

elequ
112
accept rate: 0%


Just to be sure, you are serving the static content from an apache/mod_Wsgi stack or a Static/PHP/CGI type app?

Httpd.conf would only apply to the apache/mod_Wsgi type app, it would also need those headers within a location directive to tell the application where it is being applied.

You may also be able to set them in the app layer such as with this Django project, assuming you are using Django.

permanent link

answered 24 Nov, 19:49

johns's gravatar image

johns ♦♦
5.0k29
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×122
×25
×2
×1

question asked: 24 Nov, 16:48

question was seen: 83 times

last updated: 24 Nov, 19:49

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED
WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM