ah, that would probably make more sense. Thanks I'll try that. Feels dirty either way but I guess this is a common middleware pattern.