Correct usage of Response Before function


#1

I’m wondering how to correctly use Response Before(). I’m adding a BeforeFunc in a middleware to the response. But the response is not always renewed, why I’m checking the c.Response() pointer address.

I’m pretty sure that’s not the right way. :wink: How to correctly use c.Response().Before(…)?

Thanks,
Sebastian


#2

It would be great to provide a sample code for debugging.