Serving .woff/.woff2 over CSP
I have a .woff2 file I'm trying to serve over CSP.
If I set:
Then it "just works" - but I'd rather not do something so heavy-handed/instance-wide, on principle. (This is for something that will ultimately be published on the Open Exchange.)
A more granular option, it seems, is described in the %CSP.StreamServer class reference:
if you need to define settings per extension (in uppercase) you can use ^%SYS("CSP","MimeFileClassify",$zcvt(ext,"U"))=$listbuild(type,bin,charset) where:
- bin - 1 if this is binary and 0 if this is a character file
- charset - For character files the charset to report in the charset header
If nothing is defined then for character files we use the default charset associated with the file device in InterSystems IRIS.
However, I can't seem to get this to work with any combination of settings. (I see the charset in the content-type header but the file is still mangled.)
Has anyone else solved this problem before?