Forum

How to set access control headers?

Rakhesh Sasidharan
31 January 2011, 08:47

Hiawatha version: 7.4
Operating System: Lenny

Hi,

I am trying to set fonts on a website via the new @font-face CSS rule.

Thing is, the fonts are located in a different virtual site from the one where content is being served from. This causes Firefox to ignore the fonts because it requires a certain access control header to be set (see https://wiki.mozilla.org/Evangelism/Firefox3.5/35Days/Articles/@font-face#Cross-Site_Font_Usage). Specifically, I must set the "Access-Control-Allow-Origin" header to "*".

Is there a way of implementing this in Hiawatha? The closest I could find was the AccessList directive, and so I did make a Directory section pointing to the location where these fonts are stored, and setting "AccessList allow all" there, but that didn't help.

Thanks,
Rakhesh
Hugo Leisink
31 January 2011, 13:02
Create a CGI script that uploads the file with the right HTTP headers. The header you mentioned is not an 'official' HTTP header, so Hiawatha doesn't support it.
Rakhesh Sasidharan
6 February 2011, 19:37
Thanks.
This topic has been closed.