• No replies
9224 Posts

Pinned topic Setting custom headers on FileServer

‏2011-06-27T15:01:16Z |
NOTE: this thread was migrated from Some content and formatting may have been lost in the move.

Originally posted by projectzero userid: kfbishop - f=4&t=2321#p9414
Hi all,

Reaching out to see if anyone has any cool ideas on this. I need to set some custom headers for static files served by the default FileServer process. This is outside the scope of the few expiry/etag headers that can be set.

Specifically, I'm enabling CORS (Link: on a project, and i need to apply the "Access-Control-Allow-Origin" header. I's really like to use the existing FS subsystem and not reinvent the wheel for this. Also, Our production servers front sMash with an HTTP server for performance, so this is primarily for our developer workstations, where I'd prefer to NOT set up an HTTP server. But, unless the community can come up with some ideas, I may be forced to do one of those two workarounds.