ithinkihaveacat / node-fishback

A caching HTTP proxy written in Node
MIT License
32 stars 6 forks source link

Support modular structure #1

Open mkoppanen opened 13 years ago

mkoppanen commented 13 years ago

Hello,

I would to be able to provide callback functions for different stages of the internal fishback cycle. These hooks could be used for example to transform content before it's being stored into cache to support things such as ESI.

ithinkihaveacat commented 13 years ago

Thanks for your interest in node-fishback! The development team appreciate your comments!

You can currently modify request headers (and URL) before they go out over the wire, and response headers before they get sent to clients via addResFilter() and addReqFilter(). It's actually somewhat difficult to support transformations of the body at this time, because requests and responses are streamed chunk by chunk; to transform the body you'd have to buffer the entire body. (And only do this for hooks that require it.)

I--er, I mean the development team--will discuss potential approaches at their next strategy meeting.

ithinkihaveacat commented 13 years ago

Sorry, didn't mean to close this important issue.